(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[         0,          0]
NotebookDataLength[    410558,       9657]
NotebookOptionsPosition[    400905,       9529]
NotebookOutlinePosition[    401262,       9545]
CellTagsIndexPosition[    401219,       9542]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{
Cell[BoxData[{
 StyleBox[
  RowBox[{"A", " ", "Dynamic", " ", "Model", " ", "of", " ", "Primaries"}], 
  "Chapter"], "\[IndentingNewLine]", 
 StyleBox[
  RowBox[{
  "Markov", " ", "Chain", " ", "Simulation", " ", "Replication", " ", 
   "File"}], "Subsection"], "\[IndentingNewLine]", 
 StyleBox[
  RowBox[{
   RowBox[{
    RowBox[{"Tara", " ", "Slough"}], ",", " ", 
    RowBox[{"Erin", " ", "York"}], ",", 
    RowBox[{"and", " ", "Michael", " ", "Ting"}]}], " "}], 
  "Subsubsection"], "\[IndentingNewLine]", 
 StyleBox[
  RowBox[{
   RowBox[{"April", "  ", "9"}], ",", " ", "2019"}], 
  "Subsubsection"], "\[IndentingNewLine]", 
 StyleBox[
  RowBox[{"Created", " ", "in", " ", "Mathematica", " ", 
   RowBox[{"v", ".", " ", "11.3"}], ".0", ".0"}], 
  "Text"], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"(*", 
   RowBox[{
    RowBox[{"Cells", " ", "are", " ", "denoted", " ", "xxx", 
     RowBox[{"#", ".", " ", "To"}], " ", "replicate", " ", "data", " ", 
     "output"}], ",", " ", 
    RowBox[{"sequentially", " ", "run", " ", "all", " ", 
     RowBox[{"cells", "."}]}]}], "*)"}]}]}], "Input",
 CellChangeTimes->{{3.6556969045495787`*^9, 3.655696948342016*^9}, {
   3.6556970857692633`*^9, 3.655697161728763*^9}, 3.655697214494525*^9, {
   3.655697513463725*^9, 3.65569759350391*^9}, {3.65569766750572*^9, 
   3.655697680007352*^9}, {3.655697714017119*^9, 3.6556977250195436`*^9}, {
   3.655698897913082*^9, 3.655698969862565*^9}, {3.6556994348704*^9, 
   3.655699488860113*^9}, {3.6556996147333593`*^9, 3.6556997190950527`*^9}, {
   3.655699830557543*^9, 3.655699864837134*^9}, {3.655700084943285*^9, 
   3.655700145871683*^9}, {3.655700203842985*^9, 3.65570021610183*^9}, {
   3.6557002877921867`*^9, 3.655700798668092*^9}, {3.6557008809874983`*^9, 
   3.655700998104813*^9}, {3.655701083666519*^9, 3.655701218369318*^9}, {
   3.6557012627805977`*^9, 3.655701352195424*^9}, {3.655701400083418*^9, 
   3.6557015528490973`*^9}, {3.6557016052288017`*^9, 3.655701683919537*^9}, {
   3.6557017416732893`*^9, 3.655701809756523*^9}, {3.655701939250244*^9, 
   3.655701959040605*^9}, {3.655702033850402*^9, 3.655702042635998*^9}, {
   3.655702087632134*^9, 3.655702129095551*^9}, {3.655744066333323*^9, 
   3.6557441064909286`*^9}, {3.655744175114567*^9, 3.655744459315431*^9}, {
   3.6557445187667294`*^9, 3.655744615603661*^9}, {3.655744657996176*^9, 
   3.655744666090041*^9}, {3.65574471201794*^9, 3.655744746279996*^9}, {
   3.6557448632204113`*^9, 3.6557448646474667`*^9}, {3.655746691819242*^9, 
   3.655746708399412*^9}, {3.6557468872017097`*^9, 3.655746935976253*^9}, {
   3.655747031418078*^9, 3.65574703720076*^9}, {3.655747139019821*^9, 
   3.655747160641302*^9}, {3.6557472417538357`*^9, 3.655747245786399*^9}, {
   3.6557472943783607`*^9, 3.655747353199794*^9}, {3.655747946573283*^9, 
   3.655747962426811*^9}, {3.655748052135418*^9, 3.6557482678866796`*^9}, {
   3.655748492487506*^9, 3.6557486523875837`*^9}, {3.655748709444124*^9, 
   3.655748898980624*^9}, {3.655779110999722*^9, 3.655779145443544*^9}, {
   3.65577917649615*^9, 3.655779251276925*^9}, {3.6557792878960657`*^9, 
   3.655779299215254*^9}, {3.655779364775825*^9, 3.65577943320492*^9}, {
   3.65577947228869*^9, 3.655779476666627*^9}, {3.65577961816082*^9, 
   3.6557796647346888`*^9}, {3.655779723662045*^9, 3.655779770632847*^9}, {
   3.655779850985765*^9, 3.6557798872434*^9}, {3.655780174294258*^9, 
   3.6557801961537733`*^9}, {3.6557804937421837`*^9, 3.655780524215558*^9}, {
   3.6557805854950953`*^9, 3.655780603663232*^9}, {3.6557806448403788`*^9, 
   3.6557806578512278`*^9}, {3.655780693067786*^9, 3.655780730704965*^9}, {
   3.6557807707114964`*^9, 3.655780772043721*^9}, {3.6557808677908783`*^9, 
   3.655780973469843*^9}, {3.655781455923595*^9, 3.6557814655086727`*^9}, 
   3.655781540304638*^9, {3.6557826633975077`*^9, 3.655782724589387*^9}, {
   3.655783323627974*^9, 3.655783391255227*^9}, {3.6557839520782003`*^9, 
   3.655784014214223*^9}, {3.6557841885482273`*^9, 3.655784273304399*^9}, {
   3.6557844297919817`*^9, 3.65578449584048*^9}, {3.655784920107821*^9, 
   3.655784936661912*^9}, {3.655784999941584*^9, 3.6557850071103*^9}, {
   3.655785149404916*^9, 3.655785195134634*^9}, {3.655785275065568*^9, 
   3.6557852903596077`*^9}, {3.65578564124203*^9, 3.655785690799816*^9}, {
   3.6557857353912363`*^9, 3.655785795077847*^9}, {3.655785827589326*^9, 
   3.655785848354851*^9}, {3.655786060188362*^9, 3.655786063539495*^9}, {
   3.655786226101776*^9, 3.6557862965437813`*^9}, {3.6557863876307697`*^9, 
   3.655786392946278*^9}, {3.655786559223537*^9, 3.655786575134231*^9}, {
   3.6557872297693653`*^9, 3.655787252266862*^9}, {3.655787328129447*^9, 
   3.655787392303783*^9}, {3.655787512301564*^9, 3.65578753108148*^9}, 
   3.655787658575609*^9, {3.6557876892987013`*^9, 3.655787731215684*^9}, {
   3.655787983720475*^9, 3.655787990856142*^9}, {3.655788033376727*^9, 
   3.655788037154777*^9}, {3.655788113780545*^9, 3.655788134489586*^9}, {
   3.655788177780504*^9, 3.655788252461755*^9}, {3.6557883377219667`*^9, 
   3.655788406050454*^9}, {3.655834437163148*^9, 3.6558344374276752`*^9}, {
   3.6558365584074*^9, 3.655836558507166*^9}, 3.655836965806882*^9, {
   3.656443970652401*^9, 3.656444012291102*^9}, {3.656444110373949*^9, 
   3.656444127860427*^9}, {3.656444335613316*^9, 3.656444443158476*^9}, {
   3.656444578586463*^9, 3.656444620270113*^9}, {3.656444711666729*^9, 
   3.656444721417533*^9}, {3.65644476547997*^9, 3.65644477228515*^9}, {
   3.656474509489209*^9, 3.656474611357772*^9}, {3.656474661509121*^9, 
   3.65647471510997*^9}, {3.656474907521687*^9, 3.6564749278471613`*^9}, {
   3.6564750391891003`*^9, 3.6564750439652*^9}, {3.656475074502075*^9, 
   3.656475081357016*^9}, 3.656475119024795*^9, 3.656475157606414*^9, {
   3.656475355128993*^9, 3.656475366188363*^9}, {3.656475527702195*^9, 
   3.656475544874825*^9}, {3.6564765305589867`*^9, 3.656476544905654*^9}, {
   3.656476758871916*^9, 3.656476796995449*^9}, {3.656479386724381*^9, 
   3.656479389331829*^9}, {3.6564795351462297`*^9, 3.65647954535236*^9}, {
   3.656479598988964*^9, 3.656479648927223*^9}, {3.6564796820504017`*^9, 
   3.656479696641938*^9}, {3.6564797333796463`*^9, 3.656479951896508*^9}, 
   3.656480038384046*^9, {3.65648007137309*^9, 3.6564800963629827`*^9}, 
   3.656480225688141*^9, {3.656480308847281*^9, 3.656480420484234*^9}, {
   3.656480650538151*^9, 3.656480755719294*^9}, {3.656480839444726*^9, 
   3.656480858587591*^9}, 3.6564808941110563`*^9, {3.6565645412588787`*^9, 
   3.656564560200672*^9}, {3.656564599262755*^9, 3.656564626351812*^9}, {
   3.656564666611518*^9, 3.656564685381269*^9}, 3.656564734050688*^9, {
   3.656567073318323*^9, 3.6565670901380377`*^9}, {3.656567133344804*^9, 
   3.656567160547975*^9}, {3.6565672978031797`*^9, 3.656567299574399*^9}, {
   3.6565677238535*^9, 3.656567775423768*^9}, {3.656567808310503*^9, 
   3.656567815550397*^9}, 3.656567895147842*^9, 3.656567927083281*^9, 
   3.6565679594670353`*^9, {3.656567994729938*^9, 3.656568147609496*^9}, {
   3.656568190448594*^9, 3.656568299389679*^9}, 3.656568470149192*^9, {
   3.656568550919259*^9, 3.6565686279740877`*^9}, {3.656568723652186*^9, 
   3.656568732051841*^9}, {3.656568772338716*^9, 3.656568791138753*^9}, {
   3.6565688831037607`*^9, 3.656568951005419*^9}, {3.656568998913699*^9, 
   3.656569062375802*^9}, 3.6565991968854923`*^9, {3.656599229548421*^9, 
   3.656599269499651*^9}, 3.656599778910634*^9, {3.656602085123723*^9, 
   3.656602128896946*^9}, {3.656602196848732*^9, 3.656602230509688*^9}, {
   3.656602261452573*^9, 3.6566023128154373`*^9}, {3.6566024152428303`*^9, 
   3.656602415811593*^9}, {3.656602701188323*^9, 3.65660270492973*^9}, {
   3.65660273744816*^9, 3.656602743990909*^9}, {3.6566027987302732`*^9, 
   3.65660281212994*^9}, {3.6566028424683743`*^9, 3.65660284465926*^9}, {
   3.6566029152582483`*^9, 3.656602934026082*^9}, 3.65660308851546*^9, {
   3.656603183864913*^9, 3.656603190641493*^9}, {3.656603224909052*^9, 
   3.656603228757324*^9}, {3.656603349745324*^9, 3.656603412647931*^9}, {
   3.656603475732348*^9, 3.656603502249844*^9}, {3.656603604202389*^9, 
   3.656603710719249*^9}, {3.656603792078651*^9, 3.656603841591642*^9}, {
   3.6566038817216673`*^9, 3.656603920278763*^9}, {3.65660397560846*^9, 
   3.656604000903378*^9}, {3.656604695467661*^9, 3.6566047659404993`*^9}, {
   3.6566048040687237`*^9, 3.656604867062207*^9}, {3.656610094609708*^9, 
   3.656610096912027*^9}, 3.656610593395219*^9, 3.6566114661103573`*^9, 
   3.656611707852213*^9, {3.6566122950792933`*^9, 3.656612347886999*^9}, {
   3.656624665128845*^9, 3.656624744452305*^9}, 3.656695448027432*^9, {
   3.656695757248652*^9, 3.6566957619727077`*^9}, {3.656695792140415*^9, 
   3.65669586145362*^9}, {3.656695928894565*^9, 3.656695945975415*^9}, {
   3.661023583564548*^9, 3.661023625549798*^9}, {3.6610555250442247`*^9, 
   3.661055553537571*^9}, {3.661056162299157*^9, 3.661056219154682*^9}, 
   3.661056366195716*^9, {3.661056409015252*^9, 3.661056470473908*^9}, {
   3.661056514482748*^9, 3.661056649695445*^9}, {3.661056711225555*^9, 
   3.661056818831669*^9}, {3.6610568651342163`*^9, 3.6610569621476917`*^9}, {
   3.661057051575919*^9, 3.6610571558805103`*^9}, {3.661057789077402*^9, 
   3.6610578242415524`*^9}, {3.661058197523364*^9, 3.661058197634058*^9}, {
   3.661058598186194*^9, 3.661058617717147*^9}, {3.661059023487361*^9, 
   3.6610590685867643`*^9}, {3.661196325106153*^9, 3.661196343538898*^9}, {
   3.6612281950085897`*^9, 3.661228229667182*^9}, {3.661229192924473*^9, 
   3.661229208831953*^9}, {3.661229361228341*^9, 3.66122937995929*^9}, {
   3.663605426866475*^9, 3.6636054275974216`*^9}, {3.664301828135516*^9, 
   3.664301940255706*^9}, 3.664303988973629*^9, {3.6643040743572397`*^9, 
   3.664304114866682*^9}, {3.664304180673052*^9, 3.664304180751899*^9}, {
   3.6643042381741047`*^9, 3.664304275603153*^9}, {3.665364010690982*^9, 
   3.665364048677452*^9}, 3.66536464991103*^9, {3.6654178091159163`*^9, 
   3.665417829861264*^9}, {3.66541805215619*^9, 3.665418071382758*^9}, {
   3.665418176900446*^9, 3.665418183553877*^9}, {3.665418467655634*^9, 
   3.665418478016315*^9}, {3.6656953507307568`*^9, 3.66569535682023*^9}, {
   3.6656954064672203`*^9, 3.665695407731065*^9}, 3.665894959531279*^9, {
   3.665978393515964*^9, 3.665978406008376*^9}, {3.665978436617187*^9, 
   3.66597846961556*^9}, 3.665978522076048*^9, {3.6659785551619*^9, 
   3.665978565390005*^9}, {3.6661549840674877`*^9, 3.666155008129917*^9}, {
   3.6661550597659283`*^9, 3.666155088758397*^9}, 3.666155119134183*^9, {
   3.666155844780158*^9, 3.666155883143176*^9}, 3.666155945272677*^9, {
   3.6661559773607073`*^9, 3.6661560030480757`*^9}, 3.6661566715783*^9, {
   3.66615671124839*^9, 3.666156737824297*^9}, 3.666156771536497*^9, {
   3.666156802381719*^9, 3.666156806557921*^9}, {3.6662199120790997`*^9, 
   3.666219916806625*^9}, {3.6662202378859797`*^9, 3.6662202380622253`*^9}, {
   3.666222602301866*^9, 3.666222663376761*^9}, {3.666224712997427*^9, 
   3.6662247871075068`*^9}, {3.666225356050218*^9, 3.666225360710042*^9}, 
   3.666225606637322*^9, {3.6662397474680433`*^9, 3.6662397523516283`*^9}, {
   3.666240568253304*^9, 3.66624060842279*^9}, {3.666453700947694*^9, 
   3.666453701332995*^9}, {3.6679679250375*^9, 3.667967990762103*^9}, {
   3.667968140463832*^9, 3.6679681492391443`*^9}, {3.668018290598168*^9, 
   3.66801829075908*^9}, {3.66801887891685*^9, 3.6680189005972853`*^9}, {
   3.668018944917727*^9, 3.6680189909672117`*^9}, {3.668019021890527*^9, 
   3.668019044220525*^9}, {3.668019075869595*^9, 3.6680190929559793`*^9}, {
   3.66801915072464*^9, 3.6680191962173557`*^9}, {3.668019234749444*^9, 
   3.668019345377239*^9}, 3.668019393602047*^9, 3.668029637154789*^9, {
   3.668031830293798*^9, 3.668031847829191*^9}, 3.668031923310047*^9, 
   3.668031962905039*^9, 3.668033660623436*^9, 3.66803371403985*^9, 
   3.668033762453415*^9, 3.6680338146139727`*^9, {3.6680338522636003`*^9, 
   3.668033981451724*^9}, 3.668034383558654*^9, {3.6682559460341787`*^9, 
   3.668255949579508*^9}, {3.668353344544366*^9, 3.668353350755664*^9}, 
   3.668353749093267*^9, 3.668353782930604*^9, 3.6683538153563757`*^9, 
   3.668353874261825*^9, 3.668353906366062*^9, 3.668353939949061*^9, 
   3.6683539927878723`*^9, 3.668354051387344*^9, {3.6683541244854603`*^9, 
   3.668354134030307*^9}, {3.668354791606987*^9, 3.668354797882305*^9}, {
   3.668354893741769*^9, 3.66835491601759*^9}, {3.6683549754892197`*^9, 
   3.668354996854433*^9}, {3.668355055521628*^9, 3.668355083170212*^9}, 
   3.668785951411257*^9, 3.668785996275543*^9, 3.668786044718202*^9, 
   3.66878608091442*^9, {3.668787012101677*^9, 3.668787022906549*^9}, {
   3.668787135858787*^9, 3.668787161185461*^9}, {3.67076989727452*^9, 
   3.670769897481184*^9}, {3.67240777878127*^9, 3.672407779140691*^9}, {
   3.672978378139676*^9, 3.6729783786814213`*^9}, {3.673753202670354*^9, 
   3.67375322983908*^9}, {3.673753381610606*^9, 3.673753471039565*^9}, {
   3.673753506113686*^9, 3.6737535102030153`*^9}, {3.673753567434441*^9, 
   3.6737537074040117`*^9}, {3.673753743436824*^9, 3.673753748599249*^9}, {
   3.673753859520747*^9, 3.673753879583106*^9}, {3.6737539319768476`*^9, 
   3.673753938657332*^9}, {3.673754004447267*^9, 3.6737540339094553`*^9}, {
   3.673754117737503*^9, 3.673754237569686*^9}, 3.6737546451445723`*^9, 
   3.673754685366797*^9, 3.673754764835864*^9, 3.673754797226262*^9, 
   3.673754828810038*^9, {3.6737548742629423`*^9, 3.6737549225715313`*^9}, 
   3.673754960551587*^9, {3.67375499495562*^9, 3.673755079478938*^9}, 
   3.673755134673111*^9, {3.6737558265515327`*^9, 3.673755893889888*^9}, {
   3.6738427818316*^9, 3.6738428593011713`*^9}, {3.673843022351122*^9, 
   3.67384303217588*^9}, {3.674226137992115*^9, 3.67422619472686*^9}, {
   3.67422655361826*^9, 3.674226600795897*^9}, {3.674226631430769*^9, 
   3.674226678133148*^9}, {3.674226750127736*^9, 3.674226797694374*^9}, {
   3.674226830535409*^9, 3.674226877047233*^9}, {3.6742330208848057`*^9, 
   3.67423304742671*^9}, 3.674233556995833*^9, {3.674233631795946*^9, 
   3.6742336991897163`*^9}, {3.674233767589295*^9, 3.6742337741981297`*^9}, {
   3.6742341712407084`*^9, 3.674234179849358*^9}, {3.6742346308100767`*^9, 
   3.6742348618901873`*^9}, {3.6742349024269876`*^9, 
   3.6742350351643753`*^9}, {3.674235101078898*^9, 3.6742351470973167`*^9}, {
   3.674235362204145*^9, 3.674235437045094*^9}, {3.674235483423118*^9, 
   3.674235529432592*^9}, {3.6742355633377457`*^9, 3.674235617287084*^9}, {
   3.6742358907146063`*^9, 3.674235991920731*^9}, {3.6742360450894537`*^9, 
   3.674236057779792*^9}, {3.674840346560136*^9, 3.674840386274868*^9}, {
   3.6748404754467382`*^9, 3.6748405426744337`*^9}, {3.674842517940474*^9, 
   3.6748425239849443`*^9}, {3.674842580758582*^9, 3.67484259495463*^9}, {
   3.6748426657914467`*^9, 3.67484266616017*^9}, 3.674842806326234*^9, {
   3.674843089910747*^9, 3.674843185943738*^9}, {3.674844419020769*^9, 
   3.674844807107823*^9}, {3.6748448544287367`*^9, 3.674844879394603*^9}, {
   3.675464979675335*^9, 3.675464988623948*^9}, 3.679768962833537*^9, 
   3.679777146091179*^9, {3.6810628807523737`*^9, 3.6810630070635157`*^9}, {
   3.681063038207281*^9, 3.681063073580675*^9}, {3.681063186304368*^9, 
   3.681063278404393*^9}, {3.681063513219605*^9, 3.681063619767761*^9}, {
   3.6810637884013987`*^9, 3.681063827842473*^9}, {3.681063877243496*^9, 
   3.681063898997061*^9}, 3.6810840816847563`*^9, {3.681084246207885*^9, 
   3.681084247672018*^9}, {3.681094791034171*^9, 3.681094792852931*^9}, {
   3.681094858840102*^9, 3.681094865676208*^9}, {3.68109536525331*^9, 
   3.681095439590947*^9}, 3.6810957442150784`*^9, {3.681095815029809*^9, 
   3.681095917141533*^9}, {3.68109595852535*^9, 3.681095960284712*^9}, {
   3.68109667101359*^9, 3.681096671355466*^9}, {3.681096859344351*^9, 
   3.681097021086933*^9}, {3.681097561004352*^9, 3.681097657618351*^9}, {
   3.681097692049062*^9, 3.681097751689946*^9}, {3.681098074199958*^9, 
   3.681098093780075*^9}, {3.681098251939355*^9, 3.681098279709908*^9}, {
   3.6810986640537987`*^9, 3.681098699347838*^9}, {3.681143252289137*^9, 
   3.681143351644944*^9}, {3.6811434597671432`*^9, 3.681143522406806*^9}, {
   3.6811435657886133`*^9, 3.681143684104453*^9}, {3.681143811010682*^9, 
   3.681143816909189*^9}, {3.681143883115938*^9, 3.681143910245565*^9}, {
   3.681143975759418*^9, 3.6811439860132523`*^9}, {3.681144084527836*^9, 
   3.681144108026678*^9}, {3.681144216093721*^9, 3.681144305266738*^9}, {
   3.681144381730763*^9, 3.681144402157851*^9}, 3.681144482476859*^9, 
   3.681144723593614*^9, {3.681144797454055*^9, 3.681144974902609*^9}, {
   3.681145538884254*^9, 3.681145582136866*^9}, {3.681145630469822*^9, 
   3.681145655242414*^9}, {3.681145685336232*^9, 3.6811457582647133`*^9}, {
   3.681145891713855*^9, 3.681145894917603*^9}, {3.681145989852735*^9, 
   3.6811459925234623`*^9}, {3.681146082194442*^9, 3.681146084474386*^9}, {
   3.681146225332096*^9, 3.6811462277315683`*^9}, {3.681146317642667*^9, 
   3.681146352498068*^9}, {3.681146412349124*^9, 3.681146472595998*^9}, {
   3.681146558385929*^9, 3.681146560817416*^9}, {3.681146893216846*^9, 
   3.681146895841*^9}, {3.681147057101383*^9, 3.68114710639242*^9}, {
   3.681147346561636*^9, 3.68114735135569*^9}, {3.681147401468254*^9, 
   3.6811474607485943`*^9}, 3.681147522196763*^9, {3.681147739747787*^9, 
   3.6811477623270473`*^9}, {3.681147793070963*^9, 3.681147797797327*^9}, {
   3.68114785137181*^9, 3.681147856542211*^9}, {3.681147956564603*^9, 
   3.681147958996069*^9}, {3.681148117758882*^9, 3.681148120135434*^9}, 
   3.681148168404652*^9, {3.681148258607171*^9, 3.681148277150629*^9}, {
   3.68114831119247*^9, 3.68114831618908*^9}, {3.681148530581483*^9, 
   3.681148599862707*^9}, {3.681148657926941*^9, 3.681148712198728*^9}, {
   3.6811487427815657`*^9, 3.6811488544572773`*^9}, {3.6811489239323063`*^9, 
   3.68114893182622*^9}, {3.681149030688048*^9, 3.6811490502754383`*^9}, {
   3.681149097442711*^9, 3.681149104463245*^9}, {3.68114913632325*^9, 
   3.681149167642371*^9}, {3.6811492041140757`*^9, 3.681149229910213*^9}, {
   3.681149599382193*^9, 3.681149719053691*^9}, {3.681149770357382*^9, 
   3.681149928689267*^9}, {3.681149970975169*^9, 3.681150142406597*^9}, {
   3.681150203750476*^9, 3.681150232869417*^9}, {3.6811502666790667`*^9, 
   3.6811503832267113`*^9}, {3.6811504268229628`*^9, 3.681150537955812*^9}, {
   3.681150772988089*^9, 3.68115082218536*^9}, {3.6811508897175694`*^9, 
   3.681150981423316*^9}, {3.6811510457783337`*^9, 3.681151046946452*^9}, {
   3.681151171986701*^9, 3.681151200017424*^9}, {3.681151474375023*^9, 
   3.681151504108967*^9}, {3.6811515496312313`*^9, 3.681151693289844*^9}, {
   3.68115219441376*^9, 3.681152238542252*^9}, {3.6811522708292437`*^9, 
   3.681152307037229*^9}, {3.681152351603984*^9, 3.68115247090504*^9}, 
   3.681152701618003*^9, 3.68115290992269*^9, {3.681152941925377*^9, 
   3.681152991963181*^9}, {3.681153022005909*^9, 3.681153056327114*^9}, {
   3.6811617406059217`*^9, 3.6811618245510283`*^9}, {3.6811618583925037`*^9, 
   3.681161881947967*^9}, {3.6811619146411943`*^9, 3.681161928935604*^9}, {
   3.681162017396137*^9, 3.681162057573429*^9}, {3.6811621046417913`*^9, 
   3.681162142964425*^9}, {3.6811621960934258`*^9, 3.681162299963286*^9}, {
   3.681162358220017*^9, 3.681162412729548*^9}, {3.6811643682439823`*^9, 
   3.68116444276239*^9}, {3.681164556714806*^9, 3.681164601373633*^9}, {
   3.681164723111594*^9, 3.6811647298265657`*^9}, {3.681164775391477*^9, 
   3.6811647834517813`*^9}, {3.6811648679935703`*^9, 
   3.6811649052364197`*^9}, {3.681165131581167*^9, 3.681165138870425*^9}, 
   3.681165276523944*^9, {3.681169173017664*^9, 3.681169174311305*^9}, {
   3.681169407657935*^9, 3.6811695334045277`*^9}, {3.681169654032877*^9, 
   3.6811697029779043`*^9}, {3.681169738644771*^9, 3.681169776027862*^9}, {
   3.681169841047707*^9, 3.681169849682024*^9}, {3.681170172886101*^9, 
   3.681170176738043*^9}, {3.68117031223575*^9, 3.681170353121282*^9}, {
   3.681170910631763*^9, 3.681170955197617*^9}, {3.681171029694336*^9, 
   3.6811711916821136`*^9}, {3.6811715149992*^9, 3.681171557670632*^9}, {
   3.681171593042083*^9, 3.681171662632987*^9}, {3.6811719016480913`*^9, 
   3.681171960341846*^9}, {3.681172138727128*^9, 3.681172145313972*^9}, {
   3.681180318366177*^9, 3.681180632750218*^9}, {3.6811807638986883`*^9, 
   3.681180802551042*^9}, {3.681180863411635*^9, 3.681180890519033*^9}, {
   3.681181183997016*^9, 3.681181204431755*^9}, 3.681182064657395*^9, {
   3.681182328558342*^9, 3.681182335039892*^9}, {3.681182820227943*^9, 
   3.68118282130898*^9}, {3.6812291969161167`*^9, 3.681229220239325*^9}, {
   3.681229282389657*^9, 3.681229282994191*^9}, {3.683565419646818*^9, 
   3.683565425496804*^9}, {3.683565458791307*^9, 3.683565468269518*^9}, 
   3.683892233752467*^9, {3.6838922662427073`*^9, 3.683892311218069*^9}, {
   3.6838930180970297`*^9, 3.683893043863544*^9}, 3.683893280076545*^9, {
   3.6838933390722313`*^9, 3.683893342333606*^9}, 3.683893431926052*^9, {
   3.683894213454645*^9, 3.683894225332776*^9}, {3.6838942711853*^9, 
   3.683894329800722*^9}, {3.683894360514092*^9, 3.683894425924917*^9}, 
   3.6838975587077007`*^9, {3.683897823689829*^9, 3.683897843241229*^9}, {
   3.6839012539801073`*^9, 3.68390134568299*^9}, {3.6839014415385227`*^9, 
   3.683901486670298*^9}, {3.6839015682977552`*^9, 3.683901628892839*^9}, {
   3.683901688945384*^9, 3.6839017791501093`*^9}, {3.683901813261648*^9, 
   3.683901850408699*^9}, {3.683901881573168*^9, 3.6839019630489273`*^9}, {
   3.683902101434054*^9, 3.683902126934218*^9}, 3.683902237749786*^9, {
   3.683902276282715*^9, 3.683902276830513*^9}, {3.6839023278623857`*^9, 
   3.683902375604822*^9}, {3.683902406623643*^9, 3.6839024431460857`*^9}, {
   3.6839028365169163`*^9, 3.683902956877437*^9}, 3.683903073987175*^9, {
   3.6839031055350313`*^9, 3.6839032876217422`*^9}, {3.683903318792428*^9, 
   3.683903367952126*^9}, {3.683903420311298*^9, 3.683903577339014*^9}, {
   3.6839036386326723`*^9, 3.683903808441792*^9}, {3.683903942763453*^9, 
   3.683903985153413*^9}, {3.6839040747188263`*^9, 3.683904114546836*^9}, {
   3.683904314929718*^9, 3.68390447921596*^9}, {3.683904514163961*^9, 
   3.683904591344945*^9}, {3.683904672807591*^9, 3.683904708331335*^9}, {
   3.6839047435916986`*^9, 3.683904770280657*^9}, {3.6839048063765173`*^9, 
   3.683904846967449*^9}, {3.68390497634664*^9, 3.683905064838929*^9}, {
   3.683905262737903*^9, 3.683905343735585*^9}, {3.683905436193942*^9, 
   3.683905461121059*^9}, {3.683905503322003*^9, 3.683905546336514*^9}, {
   3.6839060610369053`*^9, 3.68390606128048*^9}, {3.6839061712425013`*^9, 
   3.6839062645906353`*^9}, {3.6839063066063023`*^9, 3.683906317795884*^9}, {
   3.6839072415267563`*^9, 3.683907292177362*^9}, {3.683991339977468*^9, 
   3.683991450673688*^9}, {3.683991533465312*^9, 3.68399154305653*^9}, {
   3.683991605628922*^9, 3.683991654556541*^9}, {3.683991952539225*^9, 
   3.683991958604719*^9}, {3.683992141151143*^9, 3.683992196401704*^9}, {
   3.683992279376669*^9, 3.6839922888503857`*^9}, {3.683992372102684*^9, 
   3.68399257589279*^9}, 3.683992680660678*^9, {3.68399274740197*^9, 
   3.683992751736013*^9}, {3.6839930277973127`*^9, 3.683993028245635*^9}, {
   3.683993098691717*^9, 3.68399312324222*^9}, {3.683993389691242*^9, 
   3.683993402014574*^9}, {3.692619464456427*^9, 3.6926196400401583`*^9}, {
   3.692619759463627*^9, 3.69261977346439*^9}, {3.692619877972939*^9, 
   3.692619935403736*^9}, {3.692620028565526*^9, 3.692620033455007*^9}, {
   3.692620233550186*^9, 3.692620233811203*^9}, {3.692620865759804*^9, 
   3.692620865902776*^9}, {3.69262101799091*^9, 3.6926210180923977`*^9}, {
   3.6926211787111473`*^9, 3.692621179817383*^9}, {3.692621288701289*^9, 
   3.692621289056712*^9}, {3.692621405782123*^9, 3.6926214060256243`*^9}, {
   3.692621526117157*^9, 3.6926215268624887`*^9}, {3.6926216346985188`*^9, 
   3.692621634886984*^9}, {3.692621665303541*^9, 3.692621665419945*^9}, {
   3.692621858899351*^9, 3.692621859077977*^9}, 3.692622057210783*^9, {
   3.692622282185726*^9, 3.6926222823289127`*^9}, {3.6926228641130533`*^9, 
   3.692622864219365*^9}, {3.69262295966648*^9, 3.692622959786669*^9}, {
   3.6926230710685863`*^9, 3.6926230719984303`*^9}, {3.692623174940878*^9, 
   3.692623175700794*^9}, {3.6926232593529177`*^9, 3.6926232598227367`*^9}, {
   3.692623330093791*^9, 3.692623330209894*^9}, {3.69262341514095*^9, 
   3.6926234152618732`*^9}, {3.6926235012809267`*^9, 3.692623503596023*^9}, {
   3.6926235830416327`*^9, 3.6926235831364202`*^9}, {3.692623656442459*^9, 
   3.692623656845418*^9}, {3.692623729135895*^9, 3.6926237297020893`*^9}, {
   3.692623838419091*^9, 3.692623838822535*^9}, {3.692623915647265*^9, 
   3.692623918816534*^9}, {3.692638935570221*^9, 3.692638939624324*^9}, {
   3.692640763806162*^9, 3.6926407674438467`*^9}, {3.692640894300507*^9, 
   3.69264089461125*^9}, {3.693091654829733*^9, 3.693091721793475*^9}, {
   3.693091755128813*^9, 3.693091772942811*^9}, {3.6930918379214582`*^9, 
   3.693091872451353*^9}, {3.693091911008156*^9, 3.6930919640895357`*^9}, {
   3.693092152240547*^9, 3.693092217052526*^9}, {3.69309237808772*^9, 
   3.69309239710256*^9}, {3.6930927009133043`*^9, 3.693092702894843*^9}, {
   3.693092923952589*^9, 3.693092926993292*^9}, {3.6930934014394493`*^9, 
   3.693093420469225*^9}, {3.6930945135440187`*^9, 3.693094514161789*^9}, {
   3.694184104810199*^9, 3.694184116828127*^9}, 3.694261082011174*^9, {
   3.6942612220834913`*^9, 3.694261224344653*^9}, 3.694261357526672*^9, 
   3.69426236934452*^9, {3.694262513808316*^9, 3.6942625238201036`*^9}, {
   3.694262582158804*^9, 3.69426259785588*^9}, 3.69426273964891*^9, 
   3.6942628766937532`*^9, 3.6942631513863573`*^9, {3.694263559851947*^9, 
   3.694263562940611*^9}, 3.694263760836919*^9, 3.726766204264524*^9, {
   3.726766293363641*^9, 3.7267662965436563`*^9}, {3.726766765765378*^9, 
   3.726766788113408*^9}, {3.7584208012538013`*^9, 3.758420836626297*^9}, 
   3.75842087301112*^9, {3.758420936527996*^9, 3.7584209418393173`*^9}, 
   3.758457732790756*^9, {3.758457764183873*^9, 3.758457764486145*^9}, {
   3.7638354010365763`*^9, 3.763835462954199*^9}, {3.7638354957802277`*^9, 
   3.763835576471655*^9}, {3.763835648205597*^9, 3.7638356647204237`*^9}, {
   3.763840362321856*^9, 3.7638404333467417`*^9}, {3.7638404657716837`*^9, 
   3.763840470300585*^9}, {3.7638405295570107`*^9, 3.763840547552376*^9}, {
   3.763935751126313*^9, 3.763935810623096*^9}},
 EmphasizeSyntaxErrors->
  True,ExpressionUUID->"70833fa1-0418-4d4c-a562-2eff6d088b3b"],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{Cell[
  "STEP 1: Preliminaries and One Period Strategies", "Section",
   ExpressionUUID->"58aeaf60-c35c-4495-8cf4-1513dc886c05"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "Set working directory", "Subsection",ExpressionUUID->
   "044de878-777b-40d9-8d62-8eaca470d9d7"], "\[IndentingNewLine]", 
  "\[IndentingNewLine]", 
  RowBox[{"(*", "  ", 
   RowBox[{
   "Set", " ", "directory", " ", "to", " ", "DP_Replication", " ", "folder", 
    " ", "in", " ", "your", " ", "local", " ", 
    RowBox[{"directory", "."}]}], "  ", "*)"}], "\[IndentingNewLine]", 
  RowBox[{"(*", "  ", 
   RowBox[{
    RowBox[{"Replace", " ", "..."}], " ", "with", " ", "your", " ", "local", 
    " ", 
    RowBox[{"filepath", "."}]}], "  ", "*)"}]}], "\[IndentingNewLine]", 
 RowBox[{"SetDirectory", "[", "\"\<~/.../DP_Replication\>\"", 
  "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], 
  "\n"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "Define one period best-response functions", "Subsection",ExpressionUUID->
   "2179386d-4bf8-49fa-948f-acf90038513e"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"\[Rho]l", "=", 
    RowBox[{"1", "/", "2"}]}], ";"}], "  "}], "\n", 
 RowBox[{
  RowBox[{"Print", "[", 
   RowBox[{
   "\"\<Throughout, make the following parametric assumptions: \[Rho] = \>\"",
     ",", 
    RowBox[{"\[Rho]", "=", "\[Rho]l"}]}], "]"}], "\[IndentingNewLine]", 
  "\[IndentingNewLine]", 
  RowBox[{"(*", 
   RowBox[{
    RowBox[{"Denote", ":", "\[IndentingNewLine]", " ", 
     RowBox[{
      RowBox[{
       RowBox[{"-", " ", "Public"}], " ", "goods", " ", "platforms", " ", 
       "qr", " ", "and", " ", "ql"}], "\[IndentingNewLine]", "-", " ", 
      RowBox[{
      "The", " ", "ideological", " ", "distance", " ", "between", " ", 
       "parties", " ", 
       RowBox[{"(", "polarization", ")"}], " ", "as", " ", 
       "\[CapitalDelta]"}]}]}], ";", "\[IndentingNewLine]", "  ", 
    RowBox[{
     RowBox[{"-", " ", "The"}], " ", "location", " ", "of", " ", "the", " ", 
     "median", " ", "voter", " ", "as", " ", "xm"}], ";", 
    "\[IndentingNewLine]", "  ", 
    RowBox[{
     RowBox[{"-", " ", "The"}], " ", "support", " ", "of", " ", "the", " ", 
     "general", " ", "election", " ", "shock", " ", "to", " ", "the", " ", 
     "median", " ", 
     RowBox[{"voter", "'"}], "s", " ", "location", " ", 
     RowBox[{
      RowBox[{"as", "[", 
       RowBox[{
        RowBox[{"-", "\[Alpha]"}], ",", " ", "\[Alpha]"}], "]"}], ".", 
      "\[IndentingNewLine]", 
      RowBox[{"-", " ", "The"}]}], " ", "valence", " ", "bump", " ", "as", 
     " ", 
     RowBox[{"b", "."}]}]}], " ", "*)"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"PrRwin", "[", 
   RowBox[{"ql_", ",", "qr_", ",", "xm_"}], "]"}], ":=", 
  RowBox[{
   FractionBox["1", "2"], "+", 
   FractionBox["xm", "\[Alpha]"], "+", 
   FractionBox[
    RowBox[{"qr", "-", "ql"}], 
    RowBox[{"2", " ", "\[Alpha]", " "}]]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"PrLwin", "[", 
    RowBox[{"ql_", ",", "qr_", ",", "xm_"}], "]"}], ":=", 
   RowBox[{"1", "-", 
    RowBox[{"PrRwin", "[", 
     RowBox[{"ql", ",", "qr", ",", "xm"}], "]"}]}]}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Robj", "[", 
   RowBox[{
   "ql_", ",", "bl_", ",", "qr_", ",", "br_", ",", "myfaction_", ",", "xm_"}],
    "]"}], ":=", 
  RowBox[{
   RowBox[{
    RowBox[{"PrRwin", "[", 
     RowBox[{
      RowBox[{"ql", "+", "bl"}], ",", 
      RowBox[{"qr", "+", "br"}], ",", "xm"}], "]"}], 
    RowBox[{"(", 
     RowBox[{"qr", "+", 
      RowBox[{"myfaction", " ", "v"}]}], ")"}]}], "+", 
   RowBox[{
    RowBox[{"PrLwin", "[", 
     RowBox[{
      RowBox[{"ql", "+", "bl"}], ",", 
      RowBox[{"qr", "+", "br"}], ",", "xm"}], "]"}], 
    RowBox[{"(", 
     RowBox[{"ql", "-", "\[CapitalDelta]"}], ")"}]}], "-", 
   SuperscriptBox["qr", "2"]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"Lobj", "[", 
    RowBox[{
    "ql_", ",", "bl_", ",", "qr_", ",", "br_", ",", "myfaction_", ",", 
     "xm_"}], "]"}], ":=", 
   RowBox[{
    RowBox[{
     RowBox[{"PrRwin", "[", 
      RowBox[{
       RowBox[{"ql", "+", "bl"}], ",", 
       RowBox[{"qr", "+", "br"}], ",", "xm"}], "]"}], 
     RowBox[{"(", 
      RowBox[{"qr", "-", "\[CapitalDelta]"}], ")"}]}], "+", 
    RowBox[{
     RowBox[{"PrLwin", "[", 
      RowBox[{
       RowBox[{"ql", "+", "bl"}], ",", 
       RowBox[{"qr", "+", "br"}], ",", "xm"}], "]"}], 
     RowBox[{"(", 
      RowBox[{"ql", "+", 
       RowBox[{"myfaction", " ", "v"}]}], ")"}]}], "-", 
    SuperscriptBox["ql", "2"]}]}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell["\<\
Case 1  No primaries; each party maximizes utility of elite faction\
\>", "Subsubsection",ExpressionUUID->"83dcac4d-b2f9-4841-9c94-bfa2b32a5718"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "R (elite) objective", "Text",ExpressionUUID->
   "14308a89-1f10-45c6-b55d-aa54ec6a4675"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"R0primary", "[", 
   RowBox[{"ql_", ",", "qr_", ",", "xm_"}], "]"}], ":=", 
  RowBox[{
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "\[Rho]"}], ")"}], 
    RowBox[{"(", 
     RowBox[{"1", "-", "\[Rho]l"}], ")"}], 
    RowBox[{"Robj", "[", 
     RowBox[{"ql", ",", "0", ",", "qr", ",", "0", ",", "1", ",", "xm"}], 
     "]"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "\[Rho]"}], ")"}], "\[Rho]l", " ", 
    RowBox[{"Robj", "[", 
     RowBox[{"ql", ",", "b", ",", "qr", ",", "0", ",", "1", ",", "xm"}], 
     "]"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "\[Rho]l"}], ")"}], "\[Rho]", " ", 
    RowBox[{"Robj", "[", 
     RowBox[{"ql", ",", "0", ",", "qr", ",", "b", ",", "1", ",", "xm"}], 
     "]"}]}], "+", 
   RowBox[{"\[Rho]", " ", "\[Rho]l", " ", 
    RowBox[{"Robj", "[", 
     RowBox[{"ql", ",", "b", ",", "qr", ",", "b", ",", "1", ",", "xm"}], 
     "]"}]}]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Simplify", "[", 
   RowBox[{"R0primary", "[", 
    RowBox[{"ql", ",", "qr", ",", "xm"}], "]"}], "]"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "R (non-elite) objective", "Text",ExpressionUUID->
   "f1ab06b1-ec88-4ec5-a6b2-02957a1fb38f"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"R0primaryN", "[", 
   RowBox[{"ql_", ",", "qr_", ",", "xm_"}], "]"}], ":=", 
  RowBox[{
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "\[Rho]"}], ")"}], 
    RowBox[{"(", 
     RowBox[{"1", "-", "\[Rho]l"}], ")"}], 
    RowBox[{"Robj", "[", 
     RowBox[{"ql", ",", "0", ",", "qr", ",", "0", ",", "0", ",", "xm"}], 
     "]"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "\[Rho]"}], ")"}], "\[Rho]l", " ", 
    RowBox[{"Robj", "[", 
     RowBox[{"ql", ",", "b", ",", "qr", ",", "0", ",", "0", ",", "xm"}], 
     "]"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "\[Rho]l"}], ")"}], "\[Rho]", " ", 
    RowBox[{"Robj", "[", 
     RowBox[{"ql", ",", "0", ",", "qr", ",", "b", ",", "0", ",", "xm"}], 
     "]"}]}], "+", 
   RowBox[{"\[Rho]", " ", "\[Rho]l", " ", 
    RowBox[{"Robj", "[", 
     RowBox[{"ql", ",", "b", ",", "qr", ",", "b", ",", "0", ",", "xm"}], 
     "]"}]}]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Simplify", "[", 
   RowBox[{"R0primaryN", "[", 
    RowBox[{"ql", ",", "qr", ",", "xm"}], "]"}], "]"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "L (elite) objective", "Text",ExpressionUUID->
   "1d3b1b3f-3ba4-4d7e-b1f9-49e1765ad2f1"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"L0primary", "[", 
   RowBox[{"ql_", ",", "qr_", ",", "xm_"}], "]"}], ":=", 
  RowBox[{
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "\[Rho]"}], ")"}], 
    RowBox[{"(", 
     RowBox[{"1", "-", "\[Rho]l"}], ")"}], 
    RowBox[{"Lobj", "[", 
     RowBox[{"ql", ",", "0", ",", "qr", ",", "0", ",", "1", ",", "xm"}], 
     "]"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "\[Rho]"}], ")"}], "\[Rho]l", " ", 
    RowBox[{"Lobj", "[", 
     RowBox[{"ql", ",", "b", ",", "qr", ",", "0", ",", "1", ",", "xm"}], 
     "]"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "\[Rho]l"}], ")"}], "\[Rho]", " ", 
    RowBox[{"Lobj", "[", 
     RowBox[{"ql", ",", "0", ",", "qr", ",", "b", ",", "1", ",", "xm"}], 
     "]"}]}], "+", 
   RowBox[{"\[Rho]", " ", "\[Rho]l", " ", 
    RowBox[{"Lobj", "[", 
     RowBox[{"ql", ",", "b", ",", "qr", ",", "b", ",", "1", ",", "xm"}], 
     "]"}]}]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Simplify", "[", 
   RowBox[{"L0primary", "[", 
    RowBox[{"ql", ",", "qr", ",", "xm"}], "]"}], "]"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "L (non-elite) objective", "Text",ExpressionUUID->
   "ddf49fb6-34b1-453c-8dd3-fca43d6b81bc"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"L0primaryN", "[", 
   RowBox[{"ql_", ",", "qr_", ",", "xm_"}], "]"}], ":=", 
  RowBox[{
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "\[Rho]"}], ")"}], 
    RowBox[{"(", 
     RowBox[{"1", "-", "\[Rho]l"}], ")"}], 
    RowBox[{"Lobj", "[", 
     RowBox[{"ql", ",", "0", ",", "qr", ",", "0", ",", "0", ",", "xm"}], 
     "]"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "\[Rho]"}], ")"}], "\[Rho]l", " ", 
    RowBox[{"Lobj", "[", 
     RowBox[{"ql", ",", "b", ",", "qr", ",", "0", ",", "0", ",", "xm"}], 
     "]"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "\[Rho]l"}], ")"}], "\[Rho]", " ", 
    RowBox[{"Lobj", "[", 
     RowBox[{"ql", ",", "0", ",", "qr", ",", "b", ",", "0", ",", "xm"}], 
     "]"}]}], "+", 
   RowBox[{"\[Rho]", " ", "\[Rho]l", " ", 
    RowBox[{"Lobj", "[", 
     RowBox[{"ql", ",", "b", ",", "qr", ",", "b", ",", "0", ",", "xm"}], 
     "]"}]}]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Simplify", "[", 
   RowBox[{"L0primaryN", "[", 
    RowBox[{"ql", ",", "qr", ",", "xm"}], "]"}], "]"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "Period 2 policies", "Text",ExpressionUUID->
   "424104d2-4a15-42b3-9103-e126c7c244b8"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{"Print", "[", 
  RowBox[{"\"\<R, L FOCs: \>\"", ",", 
   RowBox[{"Simplify", "[", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"R0primary", "[", 
       RowBox[{"ql", ",", "qr", ",", "xm"}], "]"}], ",", "qr"}], "]"}], "]"}],
    ",", "\"\<, \>\"", ",", 
   RowBox[{"Simplify", "[", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"L0primary", "[", 
       RowBox[{"ql", ",", "qr", ",", "xm"}], "]"}], ",", "ql"}], "]"}], 
    "]"}]}], "]"}], "\[IndentingNewLine]", 
 RowBox[{"Print", "[", 
  RowBox[{"\"\<R, L SOCs: \>\"", ",", 
   RowBox[{"Simplify", "[", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"R0primary", "[", 
       RowBox[{"ql", ",", "qr", ",", "xm"}], "]"}], ",", "qr", ",", "qr"}], 
     "]"}], "]"}], ",", "\"\<, \>\"", ",", 
   RowBox[{"Simplify", "[", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"L0primary", "[", 
       RowBox[{"ql", ",", "qr", ",", "xm"}], "]"}], ",", "ql", ",", "ql"}], 
     "]"}], "]"}]}], "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Print", "[", 
   RowBox[{"\"\<R, L FOC solutions: \>\"", ",", 
    RowBox[{"Simplify", "[", 
     RowBox[{"Solve", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"D", "[", 
         RowBox[{
          RowBox[{"R0primary", "[", 
           RowBox[{"ql", ",", "qr", ",", "xm"}], "]"}], ",", "qr"}], "]"}], 
        "\[Equal]", "0"}], ",", "qr"}], "]"}], "]"}], ",", "\"\<, \>\"", ",", 
    
    RowBox[{"Simplify", "[", 
     RowBox[{"Solve", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"D", "[", 
         RowBox[{
          RowBox[{"L0primary", "[", 
           RowBox[{"ql", ",", "qr", ",", "xm"}], "]"}], ",", "ql"}], "]"}], 
        "\[Equal]", "0"}], ",", "ql"}], "]"}], "]"}]}], "]"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{"solution0", 
  StyleBox["=",
   FontSize->14], 
  StyleBox[" ",
   FontSize->14], 
  RowBox[{
   RowBox[{"Solve", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"qr", "==", 
       FractionBox[
        RowBox[{"\[Alpha]", "-", 
         RowBox[{"2", " ", "ql"}], "+", "v", "+", 
         RowBox[{"2", " ", "xm"}], "+", "\[CapitalDelta]"}], 
        RowBox[{
         RowBox[{"-", "2"}], "+", 
         RowBox[{"4", " ", "\[Alpha]"}]}]]}], "&&", 
      RowBox[{"ql", "==", 
       FractionBox[
        RowBox[{"\[Alpha]", "-", 
         RowBox[{"2", " ", "qr"}], "+", "v", "-", 
         RowBox[{"2", " ", "xm"}], "+", "\[CapitalDelta]"}], 
        RowBox[{
         RowBox[{"-", "2"}], "+", 
         RowBox[{"4", " ", "\[Alpha]"}]}]]}]}], ",", 
     RowBox[{"{", 
      RowBox[{"ql", ",", "qr"}], "}"}]}], "]"}], "//", 
   "Simplify"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"{", 
     RowBox[{"qL0primary", ",", "qR0primary"}], "}"}], "=", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"ql", ",", "qr"}], "}"}], "/.", 
     RowBox[{"solution0", "[", 
      RowBox[{"[", "1", "]"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "Case 2  Primaries for party R only", "Subsubsection",ExpressionUUID->
   "aee75675-1626-4f04-a70e-a5724051f695"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "R elite objective under primaries", "Text",ExpressionUUID->
   "a63c8721-7f9e-40fa-8614-ed9aee65f627"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"RRprimaryobjE", "[", 
   RowBox[{"ql_", ",", "qre_", ",", "qrn_", ",", "xm_"}], "]"}], ":=", 
  RowBox[{
   RowBox[{"m", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "\[Rho]l"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]"}]}], ")"}], 
          RowBox[{"Robj", "[", 
           RowBox[{
           "ql", ",", "0", ",", "qre", ",", "0", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "ql", ",", "0", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "ql", ",", "0", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}]}], ")"}]}], "+", 
      RowBox[{"\[Rho]l", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]"}]}], ")"}], 
          RowBox[{"Robj", "[", 
           RowBox[{
           "ql", ",", "b", ",", "qre", ",", "0", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "ql", ",", "b", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "ql", ",", "b", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}]}], ")"}]}]}], ")"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "m"}], ")"}], 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "\[Rho]l"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]"}]}], ")"}], 
          RowBox[{"Robj", "[", 
           RowBox[{
           "ql", ",", "0", ",", "qrn", ",", "0", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "ql", ",", "0", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "ql", ",", "0", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}]}], ")"}]}], "+", 
      RowBox[{"\[Rho]l", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]"}]}], ")"}], 
          RowBox[{"Robj", "[", 
           RowBox[{
           "ql", ",", "b", ",", "qrn", ",", "0", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "ql", ",", "b", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "ql", ",", "b", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}]}], ")"}]}]}], ")"}]}]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Simplify", "[", 
   RowBox[{"RRprimaryobjE", "[", 
    RowBox[{"ql", ",", "qre", ",", "qrn", ",", "xm"}], "]"}], "]"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "R non-elite objective under primaries", "Text",ExpressionUUID->
   "1469b0c0-c79c-4e8e-862c-cb65a5fb70fc"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"RRprimaryobjN", "[", 
   RowBox[{"ql_", ",", "qre_", ",", "qrn_", ",", "xm_"}], "]"}], ":=", 
  RowBox[{
   RowBox[{"m", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "\[Rho]l"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]"}]}], ")"}], 
          RowBox[{"Robj", "[", 
           RowBox[{
           "ql", ",", "0", ",", "qre", ",", "0", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "ql", ",", "0", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "ql", ",", "0", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}]}], ")"}]}], "+", 
      RowBox[{"\[Rho]l", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]"}]}], ")"}], 
          RowBox[{"Robj", "[", 
           RowBox[{
           "ql", ",", "b", ",", "qre", ",", "0", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "ql", ",", "b", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "ql", ",", "b", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}]}], ")"}]}]}], ")"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "m"}], ")"}], 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "\[Rho]l"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]"}]}], ")"}], 
          RowBox[{"Robj", "[", 
           RowBox[{
           "ql", ",", "0", ",", "qrn", ",", "0", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "ql", ",", "0", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "ql", ",", "0", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}]}], ")"}]}], "+", 
      RowBox[{"\[Rho]l", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]"}]}], ")"}], 
          RowBox[{"Robj", "[", 
           RowBox[{
           "ql", ",", "b", ",", "qrn", ",", "0", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "ql", ",", "b", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "ql", ",", "b", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}]}], ")"}]}]}], ")"}]}]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Simplify", "[", 
   RowBox[{"RRprimaryobjN", "[", 
    RowBox[{"ql", ",", "qre", ",", "qrn", ",", "xm"}], "]"}], "]"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "L (elite) objective when facing R with primaries", "Text",ExpressionUUID->
   "bfd6b21e-ebb0-4598-ab1f-e018ee510360"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"LRprimaryobj", "[", 
   RowBox[{"ql_", ",", "qre_", ",", "qrn_", ",", "xm_"}], "]"}], ":=", 
  RowBox[{
   RowBox[{"m", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "\[Rho]l"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]"}]}], ")"}], 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "ql", ",", "0", ",", "qre", ",", "0", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "ql", ",", "0", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "ql", ",", "0", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}]}], ")"}]}], "+", 
      RowBox[{"\[Rho]l", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]"}]}], ")"}], 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "ql", ",", "b", ",", "qre", ",", "0", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "ql", ",", "b", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "ql", ",", "b", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}]}], ")"}]}]}], ")"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "m"}], ")"}], 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "\[Rho]l"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]"}]}], ")"}], 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "ql", ",", "0", ",", "qrn", ",", "0", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "ql", ",", "0", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "ql", ",", "0", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}]}], ")"}]}], "+", 
      RowBox[{"\[Rho]l", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]"}]}], ")"}], 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "ql", ",", "b", ",", "qrn", ",", "0", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "ql", ",", "b", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "ql", ",", "b", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}]}], ")"}]}]}], ")"}]}]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Simplify", "[", 
   RowBox[{"LRprimaryobj", "[", 
    RowBox[{"ql", ",", "qre", ",", "qrn", ",", "xm"}], "]"}], "]"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "L (non-elite) objective when facing R with primaries", "Text",
   ExpressionUUID->"7837ce56-674b-4a2c-8539-787dc5fbb8d5"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"LRprimaryobjN", "[", 
   RowBox[{"ql_", ",", "qre_", ",", "qrn_", ",", "xm_"}], "]"}], ":=", 
  RowBox[{
   RowBox[{"m", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "\[Rho]l"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]"}]}], ")"}], 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "ql", ",", "0", ",", "qre", ",", "0", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "ql", ",", "0", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "ql", ",", "0", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}]}], ")"}]}], "+", 
      RowBox[{"\[Rho]l", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]"}]}], ")"}], 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "ql", ",", "b", ",", "qre", ",", "0", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "ql", ",", "b", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "ql", ",", "b", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}]}], ")"}]}]}], ")"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "m"}], ")"}], 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "\[Rho]l"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]"}]}], ")"}], 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "ql", ",", "0", ",", "qrn", ",", "0", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "ql", ",", "0", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "ql", ",", "0", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}]}], ")"}]}], "+", 
      RowBox[{"\[Rho]l", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]"}]}], ")"}], 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "ql", ",", "b", ",", "qrn", ",", "0", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "ql", ",", "b", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "ql", ",", "b", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}]}], ")"}]}]}], ")"}]}]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Simplify", "[", 
   RowBox[{"LRprimaryobjN", "[", 
    RowBox[{"ql", ",", "qre", ",", "qrn", ",", "xm"}], "]"}], "]"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "Period 2 policies", "Text",ExpressionUUID->
   "25f34625-b70a-40bb-bd12-f02166f4bba0"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{"Print", "[", 
  RowBox[{"\"\<RE, RN, L FOCs: \>\"", ",", 
   RowBox[{"Simplify", "[", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"RRprimaryobjE", "[", 
       RowBox[{"ql", ",", "qre", ",", "qrn", ",", "xm"}], "]"}], ",", "qre"}],
      "]"}], "]"}], ",", "\"\<, \>\"", ",", 
   RowBox[{"Simplify", "[", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"RRprimaryobjN", "[", 
       RowBox[{"ql", ",", "qre", ",", "qrn", ",", "xm"}], "]"}], ",", "qrn"}],
      "]"}], "]"}], ",", "\"\<, \>\"", ",", 
   RowBox[{"Simplify", "[", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"LRprimaryobj", "[", 
       RowBox[{"ql", ",", "qre", ",", "qrn", ",", "xm"}], "]"}], ",", "ql"}], 
     "]"}], "]"}]}], "]"}], "\[IndentingNewLine]", 
 RowBox[{"Print", "[", 
  RowBox[{"\"\<RE, RN, L SOCs: \>\"", ",", 
   RowBox[{"Simplify", "[", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"RRprimaryobjE", "[", 
       RowBox[{"ql", ",", "qre", ",", "qrn", ",", "xm"}], "]"}], ",", "qre", 
      ",", "qre"}], "]"}], "]"}], ",", "\"\<, \>\"", ",", 
   RowBox[{"Simplify", "[", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"RRprimaryobjN", "[", 
       RowBox[{"ql", ",", "qre", ",", "qrn", ",", "xm"}], "]"}], ",", "qrn", 
      ",", "qrn"}], "]"}], "]"}], ",", "\"\<, \>\"", ",", 
   RowBox[{"Simplify", "[", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"LRprimaryobj", "[", 
       RowBox[{"ql", ",", "qre", ",", "qrn", ",", "xm"}], "]"}], ",", "ql", 
      ",", "ql"}], "]"}], "]"}]}], "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Print", "[", 
   RowBox[{"\"\<RE, RN, L FOC solutions: \>\"", ",", 
    RowBox[{"Simplify", "[", 
     RowBox[{"Solve", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"D", "[", 
         RowBox[{
          RowBox[{"RRprimaryobjE", "[", 
           RowBox[{"ql", ",", "qre", ",", "qrn", ",", "xm"}], "]"}], ",", 
          "qre"}], "]"}], "\[Equal]", "0"}], ",", "qre"}], "]"}], "]"}], ",", 
    "\"\<, \>\"", ",", 
    RowBox[{"Simplify", "[", 
     RowBox[{"Solve", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"D", "[", 
         RowBox[{
          RowBox[{"RRprimaryobjN", "[", 
           RowBox[{"ql", ",", "qre", ",", "qrn", ",", "xm"}], "]"}], ",", 
          "qrn"}], "]"}], "\[Equal]", "0"}], ",", "qrn"}], "]"}], "]"}], ",", 
    "\"\<, \>\"", ",", 
    RowBox[{"Simplify", "[", 
     RowBox[{"Solve", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"D", "[", 
         RowBox[{
          RowBox[{"LRprimaryobj", "[", 
           RowBox[{"ql", ",", "qre", ",", "qrn", ",", "xm"}], "]"}], ",", 
          "ql"}], "]"}], "\[Equal]", "0"}], ",", "ql"}], "]"}], "]"}]}], 
   "]"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{"solutionR", " ", "=", 
  RowBox[{
   RowBox[{"Solve", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"qre", "==", 
       FractionBox[
        RowBox[{"\[Alpha]", "-", 
         RowBox[{"2", " ", "ql"}], "+", "v", "+", 
         RowBox[{"2", " ", "xm"}], "+", "\[CapitalDelta]", "+", 
         RowBox[{"b", " ", "\[Rho]l"}]}], 
        RowBox[{
         RowBox[{"-", "2"}], "+", 
         RowBox[{"4", " ", "\[Alpha]"}]}]]}], "&&", " ", 
      RowBox[{"qrn", "==", 
       FractionBox[
        RowBox[{"\[Alpha]", "-", 
         RowBox[{"2", " ", "ql"}], "+", "v", "+", 
         RowBox[{"2", " ", "xm"}], "+", "\[CapitalDelta]", "+", 
         RowBox[{"b", " ", "\[Rho]l"}]}], 
        RowBox[{
         RowBox[{"-", "2"}], "+", 
         RowBox[{"4", " ", "\[Alpha]"}]}]]}], "&&", 
      RowBox[{"ql", "==", 
       FractionBox[
        RowBox[{"\[Alpha]", "-", "qre", "-", "qrn", "+", "v", "-", 
         RowBox[{"2", " ", "xm"}], "+", "\[CapitalDelta]", "-", 
         RowBox[{"b", " ", "\[Rho]l"}]}], 
        RowBox[{
         RowBox[{"-", "2"}], "+", 
         RowBox[{"4", " ", "\[Alpha]"}]}]]}]}], ",", 
     RowBox[{"{", 
      RowBox[{"ql", ",", "qre", ",", "qrn"}], "}"}]}], "]"}], "//", 
   "Simplify"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"{", 
     RowBox[{"qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN"}], "}"}], 
    "=", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"ql", ",", "qre", ",", "qrn"}], "}"}], "/.", 
     RowBox[{"solutionR", "[", 
      RowBox[{"[", "1", "]"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "Case 3  Primaries for party L only", "Subsubsection",ExpressionUUID->
   "126a251e-6ee1-4f3f-90aa-527d85be63dc"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "R (elite) objective when facing L with primaries", "Text",ExpressionUUID->
   "97a5b955-aab2-4c41-a71d-ec599f91520d"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"RLprimaryobj", "[", 
   RowBox[{"qle_", ",", "qln_", ",", "qr_", ",", "xm_"}], "]"}], ":=", 
  RowBox[{
   RowBox[{"ml", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "\[Rho]"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"Robj", "[", 
           RowBox[{
           "qle", ",", "0", ",", "qr", ",", "0", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "qle", ",", "b", ",", "qr", ",", "0", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "qln", ",", "b", ",", "qr", ",", "0", ",", "1", ",", "xm"}], 
           "]"}]}]}], ")"}]}], "+", 
      RowBox[{"\[Rho]", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"Robj", "[", 
           RowBox[{
           "qle", ",", "0", ",", "qr", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "qle", ",", "b", ",", "qr", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "qln", ",", "b", ",", "qr", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}]}], ")"}]}]}], ")"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "ml"}], ")"}], 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "\[Rho]"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"Robj", "[", 
           RowBox[{
           "qln", ",", "0", ",", "qr", ",", "0", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "qln", ",", "b", ",", "qr", ",", "0", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "qle", ",", "b", ",", "qr", ",", "0", ",", "1", ",", "xm"}], 
           "]"}]}]}], ")"}]}], "+", 
      RowBox[{"\[Rho]", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"Robj", "[", 
           RowBox[{
           "qln", ",", "0", ",", "qr", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "qln", ",", "b", ",", "qr", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "qle", ",", "b", ",", "qr", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}]}], ")"}]}]}], ")"}]}]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Simplify", "[", 
   RowBox[{"RLprimaryobj", "[", 
    RowBox[{"qle", ",", "qln", ",", "qr", ",", "xm"}], "]"}], "]"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "R (non-elite) objective when facing L with primaries", "Text",
   ExpressionUUID->"1e8f3d1c-9b48-41ab-a9d7-42371e41a504"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"RLprimaryobjN", "[", 
   RowBox[{"qle_", ",", "qln_", ",", "qr_", ",", "xm_"}], "]"}], ":=", 
  RowBox[{
   RowBox[{"ml", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "\[Rho]"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"Robj", "[", 
           RowBox[{
           "qle", ",", "0", ",", "qr", ",", "0", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "qle", ",", "b", ",", "qr", ",", "0", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "qln", ",", "b", ",", "qr", ",", "0", ",", "0", ",", "xm"}], 
           "]"}]}]}], ")"}]}], "+", 
      RowBox[{"\[Rho]", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"Robj", "[", 
           RowBox[{
           "qle", ",", "0", ",", "qr", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "qle", ",", "b", ",", "qr", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "qln", ",", "b", ",", "qr", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}]}], ")"}]}]}], ")"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "ml"}], ")"}], 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "\[Rho]"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"Robj", "[", 
           RowBox[{
           "qln", ",", "0", ",", "qr", ",", "0", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "qln", ",", "b", ",", "qr", ",", "0", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "qle", ",", "b", ",", "qr", ",", "0", ",", "0", ",", "xm"}], 
           "]"}]}]}], ")"}]}], "+", 
      RowBox[{"\[Rho]", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"Robj", "[", 
           RowBox[{
           "qln", ",", "0", ",", "qr", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "qln", ",", "b", ",", "qr", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Robj", "[", 
           RowBox[{
           "qle", ",", "b", ",", "qr", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}]}], ")"}]}]}], ")"}]}]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Simplify", "[", 
   RowBox[{"RLprimaryobjN", "[", 
    RowBox[{"qle", ",", "qln", ",", "qr", ",", "xm"}], "]"}], "]"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "L elite objective facing R with primaries", "Text",ExpressionUUID->
   "f28d46f1-e145-4081-a7f3-1e071568efb4"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"LLprimaryobjE", "[", 
   RowBox[{"qle_", ",", "qln_", ",", "qr_", ",", "xm_"}], "]"}], ":=", 
  RowBox[{
   RowBox[{"ml", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "\[Rho]"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "qle", ",", "0", ",", "qr", ",", "0", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "qle", ",", "b", ",", "qr", ",", "0", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "qln", ",", "b", ",", "qr", ",", "0", ",", "0", ",", "xm"}], 
           "]"}]}]}], ")"}]}], "+", 
      RowBox[{"\[Rho]", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "qle", ",", "0", ",", "qr", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "qle", ",", "b", ",", "qr", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "qln", ",", "b", ",", "qr", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}]}], ")"}]}]}], ")"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "ml"}], ")"}], 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "\[Rho]"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "qln", ",", "0", ",", "qr", ",", "0", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "qln", ",", "b", ",", "qr", ",", "0", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "qle", ",", "b", ",", "qr", ",", "0", ",", "1", ",", "xm"}], 
           "]"}]}]}], ")"}]}], "+", 
      RowBox[{"\[Rho]", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "qln", ",", "0", ",", "qr", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "qln", ",", "b", ",", "qr", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "qle", ",", "b", ",", "qr", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}]}], ")"}]}]}], ")"}]}]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Simplify", "[", 
   RowBox[{"LLprimaryobjE", "[", 
    RowBox[{"qle", ",", "qln", ",", "qr", ",", "xm"}], "]"}], "]"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "L non-elite objective facing R with primaries", "Text",ExpressionUUID->
   "67fb756f-1857-40b6-9348-4f4e37490521"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"LLprimaryobjN", "[", 
   RowBox[{"qle_", ",", "qln_", ",", "qr_", ",", "xm_"}], "]"}], ":=", 
  RowBox[{
   RowBox[{"ml", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "\[Rho]"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "qle", ",", "0", ",", "qr", ",", "0", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "qle", ",", "b", ",", "qr", ",", "0", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "qln", ",", "b", ",", "qr", ",", "0", ",", "1", ",", "xm"}], 
           "]"}]}]}], ")"}]}], "+", 
      RowBox[{"\[Rho]", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "qle", ",", "0", ",", "qr", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "qle", ",", "b", ",", "qr", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "qln", ",", "b", ",", "qr", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}]}], ")"}]}]}], ")"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "ml"}], ")"}], 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "\[Rho]"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "qln", ",", "0", ",", "qr", ",", "0", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "qln", ",", "b", ",", "qr", ",", "0", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "qle", ",", "b", ",", "qr", ",", "0", ",", "0", ",", "xm"}], 
           "]"}]}]}], ")"}]}], "+", 
      RowBox[{"\[Rho]", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "qln", ",", "0", ",", "qr", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "qln", ",", "b", ",", "qr", ",", "b", ",", "1", ",", "xm"}], 
           "]"}]}], "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Lobj", "[", 
           RowBox[{
           "qle", ",", "b", ",", "qr", ",", "b", ",", "0", ",", "xm"}], 
           "]"}]}]}], ")"}]}]}], ")"}]}]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Simplify", "[", 
   RowBox[{"LLprimaryobjN", "[", 
    RowBox[{"qle", ",", "qln", ",", "qr", ",", "xm"}], "]"}], "]"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "Period 2 policies", "Text",ExpressionUUID->
   "cb897cd6-d773-44d5-86bd-b9af40751bd6"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{"Print", "[", 
  RowBox[{"\"\<R, LE, LN FOCs: \>\"", ",", 
   RowBox[{"Simplify", "[", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"RLprimaryobj", "[", 
       RowBox[{"qle", ",", "qln", ",", "qr", ",", "xm"}], "]"}], ",", "qr"}], 
     "]"}], "]"}], ",", "\"\<, \>\"", ",", 
   RowBox[{"Simplify", "[", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"LLprimaryobjE", "[", 
       RowBox[{"qle", ",", "qln", ",", "qr", ",", "xm"}], "]"}], ",", "qle"}],
      "]"}], "]"}], ",", "\"\<, \>\"", ",", 
   RowBox[{"Simplify", "[", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"LLprimaryobjN", "[", 
       RowBox[{"qle", ",", "qln", ",", "qr", ",", "xm"}], "]"}], ",", "qln"}],
      "]"}], "]"}]}], "]"}], "\[IndentingNewLine]", 
 RowBox[{"Print", "[", 
  RowBox[{"\"\<R, LE, LN SOCs: \>\"", ",", 
   RowBox[{"Simplify", "[", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"RLprimaryobj", "[", 
       RowBox[{"qle", ",", "qln", ",", "qr", ",", "xm"}], "]"}], ",", "qr", 
      ",", "qr"}], "]"}], "]"}], ",", "\"\<, \>\"", ",", 
   RowBox[{"Simplify", "[", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"LLprimaryobjE", "[", 
       RowBox[{"qle", ",", "qln", ",", "qr", ",", "xm"}], "]"}], ",", "qle", 
      ",", "qle"}], "]"}], "]"}], ",", "\"\<, \>\"", ",", 
   RowBox[{"Simplify", "[", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"LLprimaryobjN", "[", 
       RowBox[{"qle", ",", "qln", ",", "qr", ",", "xm"}], "]"}], ",", "qln", 
      ",", "qln"}], "]"}], "]"}]}], "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Print", "[", 
   RowBox[{"\"\<R, LE, LN FOC solutions: \>\"", ",", 
    RowBox[{"Simplify", "[", 
     RowBox[{"Solve", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"D", "[", 
         RowBox[{
          RowBox[{"RLprimaryobj", "[", 
           RowBox[{"qle", ",", "qln", ",", "qr", ",", "xm"}], "]"}], ",", 
          "qr"}], "]"}], "\[Equal]", "0"}], ",", "qr"}], "]"}], "]"}], ",", 
    "\"\<, \>\"", ",", 
    RowBox[{"Simplify", "[", 
     RowBox[{"Solve", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"D", "[", 
         RowBox[{
          RowBox[{"LLprimaryobjE", "[", 
           RowBox[{"qle", ",", "qln", ",", "qr", ",", "xm"}], "]"}], ",", 
          "qle"}], "]"}], "\[Equal]", "0"}], ",", "qle"}], "]"}], "]"}], ",", 
    "\"\<, \>\"", ",", 
    RowBox[{"Simplify", "[", 
     RowBox[{"Solve", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"D", "[", 
         RowBox[{
          RowBox[{"LLprimaryobjN", "[", 
           RowBox[{"qle", ",", "qln", ",", "qr", ",", "xm"}], "]"}], ",", 
          "qln"}], "]"}], "\[Equal]", "0"}], ",", "qln"}], "]"}], "]"}]}], 
   "]"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{"solutionL", " ", "=", "\[IndentingNewLine]", 
  RowBox[{
   RowBox[{"Solve", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"qr", "==", 
       FractionBox[
        RowBox[{"\[Alpha]", "-", "qle", "-", "qln", "+", "v", "+", 
         RowBox[{"2", " ", "xm"}], "+", "\[CapitalDelta]", "-", 
         RowBox[{"b", " ", "\[Rho]l"}]}], 
        RowBox[{
         RowBox[{"-", "2"}], "+", 
         RowBox[{"4", " ", "\[Alpha]"}]}]]}], "&&", " ", 
      RowBox[{"qle", "==", 
       FractionBox[
        RowBox[{"\[Alpha]", "-", 
         RowBox[{"2", " ", "qr"}], "+", "v", "-", 
         RowBox[{"2", " ", "xm"}], "+", "\[CapitalDelta]", "+", 
         RowBox[{"b", " ", "\[Rho]l"}]}], 
        RowBox[{
         RowBox[{"-", "2"}], "+", 
         RowBox[{"4", " ", "\[Alpha]"}]}]]}], "&&", 
      RowBox[{"qln", "==", 
       FractionBox[
        RowBox[{"\[Alpha]", "-", 
         RowBox[{"2", " ", "qr"}], "+", "v", "-", 
         RowBox[{"2", " ", "xm"}], "+", "\[CapitalDelta]", "+", 
         RowBox[{"b", " ", "\[Rho]l"}]}], 
        RowBox[{
         RowBox[{"-", "2"}], "+", 
         RowBox[{"4", " ", "\[Alpha]"}]}]]}]}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{"qr", ",", " ", "qle", ",", " ", "qln"}], "}"}]}], "]"}], "//", 
   "Simplify"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"{", 
     RowBox[{"qRLprimary", ",", "qLLprimaryE", ",", "qLLprimaryN"}], "}"}], 
    "=", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"qr", ",", " ", "qle", ",", "qln"}], "}"}], "/.", 
     RowBox[{"solutionL", "[", 
      RowBox[{"[", "1", "]"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "Case 4   Primaries for both parties", "Subsubsection",ExpressionUUID->
   "12f1b413-f007-4ad6-aa7b-d156d40414a9"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "R elite objective", "Text",ExpressionUUID->
   "0be32d1d-5aca-413c-b39e-7a43542720c0"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"R2primaryobjE", "[", 
   RowBox[{"qle_", ",", "qln_", ",", "qre_", ",", "qrn_", ",", "xm_"}], "]"}],
   ":=", 
  RowBox[{
   RowBox[{"ml", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"m", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "0", ",", "qre", ",", "0", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "0", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "0", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qre", ",", "0", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qre", ",", "0", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}]}], ")"}]}]}], ")"}]}], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "m"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "0", ",", "qrn", ",", "0", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "0", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "0", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qrn", ",", "0", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qrn", ",", "0", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}]}], ")"}]}]}], ")"}]}]}], ")"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "ml"}], ")"}], 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"m", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "0", ",", "qre", ",", "0", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "0", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "0", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qre", ",", "0", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qre", ",", "0", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}]}], ")"}]}]}], ")"}]}], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "m"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "0", ",", "qrn", ",", "0", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "0", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "0", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qrn", ",", "0", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qrn", ",", "0", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}]}], ")"}]}]}], ")"}]}]}], 
     ")"}]}]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Simplify", "[", 
   RowBox[{"R2primaryobjE", "[", 
    RowBox[{"qle", ",", "qln", ",", "qre", ",", "qrn", ",", "xm"}], "]"}], 
   "]"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "R non-elite objective", "Text",ExpressionUUID->
   "ac58c851-b70a-4c03-aa0b-a61539bd70e7"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"R2primaryobjN", "[", 
   RowBox[{"qle_", ",", "qln_", ",", "qre_", ",", "qrn_", ",", "xm_"}], "]"}],
   ":=", 
  RowBox[{
   RowBox[{"ml", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"m", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "0", ",", "qre", ",", "0", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "0", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "0", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qre", ",", "0", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qre", ",", "0", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}]}], ")"}]}]}], ")"}]}], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "m"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "0", ",", "qrn", ",", "0", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "0", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "0", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qrn", ",", "0", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qrn", ",", "0", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}]}], ")"}]}]}], ")"}]}]}], ")"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "ml"}], ")"}], 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"m", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "0", ",", "qre", ",", "0", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "0", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "0", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qre", ",", "0", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qre", ",", "0", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}]}], ")"}]}]}], ")"}]}], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "m"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "0", ",", "qrn", ",", "0", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "0", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "0", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qrn", ",", "0", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qrn", ",", "0", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Robj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}]}], ")"}]}]}], ")"}]}]}], 
     ")"}]}]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Simplify", "[", 
   RowBox[{"R2primaryobjN", "[", 
    RowBox[{"qle", ",", "qln", ",", "qre", ",", "qrn", ",", "xm"}], "]"}], 
   "]"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "L elite objective", "Text",ExpressionUUID->
   "75e73b24-b848-41f0-a1fe-5acb1b2a4eeb"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"L2primaryobjE", "[", 
   RowBox[{"qle_", ",", "qln_", ",", "qre_", ",", "qrn_", ",", "xm_"}], "]"}],
   ":=", 
  RowBox[{
   RowBox[{"ml", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"m", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "0", ",", "qre", ",", "0", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "0", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "0", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qre", ",", "0", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qre", ",", "0", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}]}], ")"}]}]}], ")"}]}], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "m"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "0", ",", "qrn", ",", "0", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "0", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "0", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qrn", ",", "0", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qrn", ",", "0", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}]}], ")"}]}]}], ")"}]}]}], ")"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "ml"}], ")"}], 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"m", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "0", ",", "qre", ",", "0", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "0", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "0", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qre", ",", "0", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qre", ",", "0", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}]}], ")"}]}]}], ")"}]}], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "m"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "0", ",", "qrn", ",", "0", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "0", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "0", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qrn", ",", "0", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qrn", ",", "0", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}]}], ")"}]}]}], ")"}]}]}], 
     ")"}]}]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Simplify", "[", 
   RowBox[{"L2primaryobjE", "[", 
    RowBox[{"qle", ",", "qln", ",", "qre", ",", "qrn", ",", "xm"}], "]"}], 
   "]"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "L non-elite objective", "Text",ExpressionUUID->
   "b0c5a3fc-bf50-4d67-b4b1-888eaf8fb26c"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"L2primaryobjN", "[", 
   RowBox[{"qle_", ",", "qln_", ",", "qre_", ",", "qrn_", ",", "xm_"}], "]"}],
   ":=", 
  RowBox[{
   RowBox[{"ml", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"m", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "0", ",", "qre", ",", "0", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "0", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "0", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qre", ",", "0", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qre", ",", "0", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}]}], ")"}]}]}], ")"}]}], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "m"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "0", ",", "qrn", ",", "0", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "0", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "0", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qrn", ",", "0", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qrn", ",", "0", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}]}], ")"}]}]}], ")"}]}]}], ")"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "ml"}], ")"}], 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"m", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "0", ",", "qre", ",", "0", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "0", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "0", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qre", ",", "0", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qre", ",", "0", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}]}], ")"}]}]}], ")"}]}], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "m"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "0", ",", "qrn", ",", "0", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "0", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "0", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qrn", ",", "0", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qrn", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qln", ",", "b", ",", "qre", ",", "b", ",", "1", ",", "xm"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qrn", ",", "0", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qrn", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Lobj", "[", 
              RowBox[{
              "qle", ",", "b", ",", "qre", ",", "b", ",", "0", ",", "xm"}], 
              "]"}]}]}], ")"}]}]}], ")"}]}]}], 
     ")"}]}]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Simplify", "[", 
   RowBox[{"L2primaryobjN", "[", 
    RowBox[{"qle", ",", "qln", ",", "qre", ",", "qrn", ",", "xm"}], "]"}], 
   "]"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "Period 2 policies", "Text",ExpressionUUID->
   "b3c7bd17-250c-411d-834a-f4da7b7d7deb"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{"Print", "[", 
  RowBox[{"\"\<RE, RN, LE, LN FOCs: \>\"", ",", 
   RowBox[{"Simplify", "[", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"R2primaryobjE", "[", 
       RowBox[{"qle", ",", "qln", ",", "qre", ",", "qrn", ",", "xm"}], "]"}], 
      ",", "qre"}], "]"}], "]"}], ",", "\"\<, \>\"", ",", 
   RowBox[{"Simplify", "[", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"R2primaryobjN", "[", 
       RowBox[{"qle", ",", "qln", ",", "qre", ",", "qrn", ",", "xm"}], "]"}], 
      ",", "qrn"}], "]"}], "]"}], ",", "\"\<, \>\"", ",", 
   RowBox[{"Simplify", "[", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"L2primaryobjE", "[", 
       RowBox[{"qle", ",", "qln", ",", "qre", ",", "qrn", ",", "xm"}], "]"}], 
      ",", "qle"}], "]"}], "]"}], ",", "\"\<, \>\"", ",", 
   RowBox[{"Simplify", "[", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"L2primaryobjN", "[", 
       RowBox[{"qle", ",", "qln", ",", "qre", ",", "qrn", ",", "xm"}], "]"}], 
      ",", "qln"}], "]"}], "]"}]}], "]"}], "\[IndentingNewLine]", 
 RowBox[{"Print", "[", 
  RowBox[{"\"\<RE, RN, LE, LN SOCs: \>\"", ",", 
   RowBox[{"Simplify", "[", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"R2primaryobjE", "[", 
       RowBox[{"qle", ",", "qln", ",", "qre", ",", "qrn", ",", "xm"}], "]"}], 
      ",", "qre", ",", "qre"}], "]"}], "]"}], ",", "\"\<, \>\"", ",", 
   RowBox[{"Simplify", "[", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"R2primaryobjN", "[", 
       RowBox[{"qle", ",", "qln", ",", "qre", ",", "qrn", ",", "xm"}], "]"}], 
      ",", "qrn", ",", "qrn"}], "]"}], "]"}], ",", "\"\<, \>\"", ",", 
   RowBox[{"Simplify", "[", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"L2primaryobjE", "[", 
       RowBox[{"qle", ",", "qln", ",", "qre", ",", "qrn", ",", "xm"}], "]"}], 
      ",", "qle", ",", "qle"}], "]"}], "]"}], ",", "\"\<, \>\"", ",", 
   RowBox[{"Simplify", "[", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"L2primaryobjN", "[", 
       RowBox[{"qle", ",", "qln", ",", "qre", ",", "qrn", ",", "xm"}], "]"}], 
      ",", "qln", ",", "qln"}], "]"}], "]"}]}], "]"}], "\[IndentingNewLine]", 

 RowBox[{
  RowBox[{"Print", "[", 
   RowBox[{"\"\<RE, RN, LE, LN FOC solutions: \>\"", ",", 
    RowBox[{"Simplify", "[", 
     RowBox[{"Solve", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"D", "[", 
         RowBox[{
          RowBox[{"R2primaryobjE", "[", 
           RowBox[{"qle", ",", "qln", ",", "qre", ",", "qrn", ",", "xm"}], 
           "]"}], ",", "qre"}], "]"}], "\[Equal]", "0"}], ",", "qre"}], "]"}],
      "]"}], ",", "\"\<, \>\"", ",", 
    RowBox[{"Simplify", "[", 
     RowBox[{"Solve", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"D", "[", 
         RowBox[{
          RowBox[{"R2primaryobjN", "[", 
           RowBox[{"qle", ",", "qln", ",", "qre", ",", "qrn", ",", "xm"}], 
           "]"}], ",", "qrn"}], "]"}], "\[Equal]", "0"}], ",", "qrn"}], "]"}],
      "]"}], ",", "\"\<, \>\"", ",", 
    RowBox[{"Simplify", "[", 
     RowBox[{"Solve", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"D", "[", 
         RowBox[{
          RowBox[{"L2primaryobjE", "[", 
           RowBox[{"qle", ",", "qln", ",", "qre", ",", "qrn", ",", "xm"}], 
           "]"}], ",", "qle"}], "]"}], "\[Equal]", "0"}], ",", "qle"}], "]"}],
      "]"}], ",", "\"\<, \>\"", ",", 
    RowBox[{"Simplify", "[", 
     RowBox[{"Solve", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"D", "[", 
         RowBox[{
          RowBox[{"L2primaryobjN", "[", 
           RowBox[{"qle", ",", "qln", ",", "qre", ",", "qrn", ",", "xm"}], 
           "]"}], ",", "qln"}], "]"}], "\[Equal]", "0"}], ",", "qln"}], "]"}],
      "]"}]}], "]"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{"solution2", "=", 
  RowBox[{
   RowBox[{"Solve", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"qre", "==", 
       FractionBox[
        RowBox[{"\[Alpha]", "-", "qle", "-", "qln", "+", "v", "+", 
         RowBox[{"2", " ", "xm"}], "+", "\[CapitalDelta]"}], 
        RowBox[{
         RowBox[{"-", "2"}], "+", 
         RowBox[{"4", " ", "\[Alpha]"}]}]]}], "&&", " ", 
      RowBox[{"qrn", "==", 
       FractionBox[
        RowBox[{"\[Alpha]", "-", "qle", "-", "qln", "+", "v", "+", 
         RowBox[{"2", " ", "xm"}], "+", "\[CapitalDelta]"}], 
        RowBox[{
         RowBox[{"-", "2"}], "+", 
         RowBox[{"4", " ", "\[Alpha]"}]}]]}], "&&", 
      RowBox[{"qle", "==", 
       FractionBox[
        RowBox[{"\[Alpha]", "-", "qre", "-", "qrn", "+", "v", "-", 
         RowBox[{"2", " ", "xm"}], "+", "\[CapitalDelta]"}], 
        RowBox[{
         RowBox[{"-", "2"}], "+", 
         RowBox[{"4", " ", "\[Alpha]"}]}]]}], "&&", 
      RowBox[{"qln", "==", 
       FractionBox[
        RowBox[{"\[Alpha]", "-", "qre", "-", "qrn", "+", "v", "-", 
         RowBox[{"2", " ", "xm"}], "+", "\[CapitalDelta]"}], 
        RowBox[{
         RowBox[{"-", "2"}], "+", 
         RowBox[{"4", " ", "\[Alpha]"}]}]]}]}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{"qre", ",", "qrn", ",", " ", "qle", ",", " ", "qln"}], "}"}]}], 
    "]"}], "//", "Simplify"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"{", 
     RowBox[{
     "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
      "qR2primaryN"}], "}"}], "=", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"qle", ",", "qln", ",", "qre", ",", "qrn"}], "}"}], "/.", 
     RowBox[{"solution2", "[", 
      RowBox[{"[", "1", "]"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "One Period Best Responses", "Subsubsection",ExpressionUUID->
   "c0062660-597d-44c7-a021-78f4b9502319"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "In these expressions, > 0 means having primaries is better.", "Text",
   ExpressionUUID->"18ddfb21-6961-4463-81e9-6d92fafd0878"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Print", "[", 
   RowBox[{
   "\"\<Party R: difference between expected utility between holding \
primaries and not, given L holds primaries (function \>\"", ",", 
    RowBox[{"Style", "[", 
     RowBox[{"\"\<RbrLprimary\>\"", ",", "Purple"}], "]"}], ",", 
    "\"\<): \>\""}], "]"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Simplify", "[", 
   RowBox[{
    RowBox[{"R2primaryobjE", "[", 
     RowBox[{
     "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
      "qR2primaryN", ",", "xm"}], "]"}], "-", 
    RowBox[{"RLprimaryobj", "[", 
     RowBox[{
     "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "xm"}], 
     "]"}]}], "]"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"RbrLprimary", "[", 
    RowBox[{
    "\[Rho]_", ",", "\[Rho]l_", ",", "\[Alpha]_", ",", "\[CapitalDelta]_", 
     ",", "b_", ",", "v_", ",", "xm_"}], "]"}], ":=", 
   RowBox[{
    FractionBox["1", 
     RowBox[{"16", " ", 
      SuperscriptBox[
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], "2"], " ", 
      "\[Alpha]"}]], 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"-", "4"}], " ", 
       SuperscriptBox["\[Alpha]", "3"], " ", "v"}], "+", 
      RowBox[{"2", " ", "b", " ", "\[Rho]l", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"-", "4"}], " ", "xm"}], "+", 
         RowBox[{"3", " ", "\[CapitalDelta]"}], "+", 
         RowBox[{"b", " ", "\[Rho]l"}]}], ")"}]}], "+", 
      RowBox[{"v", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"-", "4"}], " ", "xm"}], "+", 
         RowBox[{"6", " ", "b", " ", "\[Rho]l"}]}], ")"}]}], "+", 
      RowBox[{"\[Alpha]", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"2", " ", "v", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "2"}], "+", 
            RowBox[{"6", " ", "xm"}], "-", 
            RowBox[{"7", " ", "b", " ", "\[Rho]l"}]}], ")"}]}], "+", 
         RowBox[{"b", " ", "\[Rho]l", " ", 
          RowBox[{"(", 
           RowBox[{"2", "+", 
            RowBox[{"12", " ", "xm"}], "-", 
            RowBox[{"14", " ", "\[CapitalDelta]"}], "-", 
            RowBox[{"3", " ", "b", " ", "\[Rho]l"}]}], ")"}]}]}], ")"}]}], 
      "+", 
      RowBox[{
       SuperscriptBox["\[Alpha]", "2"], " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"2", " ", "b", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "1"}], "+", 
            RowBox[{"4", " ", "\[CapitalDelta]"}]}], ")"}], " ", "\[Rho]l"}], 
         "+", 
         RowBox[{"v", " ", 
          RowBox[{"(", 
           RowBox[{"8", "-", 
            RowBox[{"8", " ", "xm"}], "+", 
            RowBox[{"8", " ", "b", " ", "\[Rho]l"}]}], ")"}]}]}], ")"}]}]}], 
     ")"}]}]}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Print", "[", 
   RowBox[{
   "\"\<Party R: difference between expected utility between holding \
primaries and not, given L has no primary (function \>\"", ",", 
    RowBox[{"Style", "[", 
     RowBox[{"\"\<RbrLnoprimary\>\"", ",", "Purple"}], "]"}], ",", " ", 
    "\"\<): \>\""}], "]"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Simplify", "[", 
   RowBox[{
    RowBox[{"RRprimaryobjE", "[", 
     RowBox[{
     "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "xm"}], "]"}],
     "-", 
    RowBox[{"R0primary", "[", 
     RowBox[{"qL0primary", ",", "qR0primary", ",", "xm"}], "]"}]}], "]"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"RbrLnoprimary", "[", 
    RowBox[{
    "\[Rho]_", ",", "\[Rho]l_", ",", "\[Alpha]_", ",", "\[CapitalDelta]_", 
     ",", "b_", ",", "v_", ",", "xm_"}], "]"}], ":=", 
   RowBox[{
    FractionBox["1", 
     RowBox[{"16", " ", 
      SuperscriptBox[
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], "2"], " ", 
      "\[Alpha]"}]], 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"-", "4"}], " ", 
       SuperscriptBox["\[Alpha]", "3"], " ", "v"}], "-", 
      RowBox[{"4", " ", "v", " ", 
       RowBox[{"(", 
        RowBox[{"xm", "-", 
         RowBox[{"b", " ", "\[Rho]l"}]}], ")"}]}], "-", 
      RowBox[{"2", " ", "b", " ", "\[Rho]l", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"4", " ", "xm"}], "-", 
         RowBox[{"3", " ", "\[CapitalDelta]"}], "+", 
         RowBox[{"b", " ", "\[Rho]l"}]}], ")"}]}], "+", 
      RowBox[{"\[Alpha]", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"4", " ", "v", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "1"}], "+", 
            RowBox[{"3", " ", "xm"}], "-", 
            RowBox[{"2", " ", "b", " ", "\[Rho]l"}]}], ")"}]}], "+", 
         RowBox[{"b", " ", "\[Rho]l", " ", 
          RowBox[{"(", 
           RowBox[{"2", "+", 
            RowBox[{"12", " ", "xm"}], "-", 
            RowBox[{"14", " ", "\[CapitalDelta]"}], "+", 
            RowBox[{"3", " ", "b", " ", "\[Rho]l"}]}], ")"}]}]}], ")"}]}], 
      "+", 
      RowBox[{
       SuperscriptBox["\[Alpha]", "2"], " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"2", " ", "b", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "1"}], "+", 
            RowBox[{"4", " ", "\[CapitalDelta]"}]}], ")"}], " ", "\[Rho]l"}], 
         "+", 
         RowBox[{"v", " ", 
          RowBox[{"(", 
           RowBox[{"8", "-", 
            RowBox[{"8", " ", "xm"}], "+", 
            RowBox[{"4", " ", "b", " ", "\[Rho]l"}]}], ")"}]}]}], ")"}]}]}], 
     ")"}]}]}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Print", "[", 
   RowBox[{
   "\"\<Party L: difference between expected utility between holding \
primaries and not, given R holds primaries (function \>\"", ",", 
    RowBox[{"Style", "[", 
     RowBox[{"\"\<LbrRprimary\>\"", ",", "Purple"}], "]"}], ",", 
    "\"\<): \>\""}], "]"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Simplify", "[", 
   RowBox[{
    RowBox[{"L2primaryobjE", "[", 
     RowBox[{
     "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
      "qR2primaryN", ",", "xm"}], "]"}], "-", 
    RowBox[{"LRprimaryobj", "[", 
     RowBox[{
     "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "xm"}], 
     "]"}]}], "]"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"LbrRprimary", "[", 
    RowBox[{
    "\[Rho]_", ",", "\[Rho]l_", ",", "\[Alpha]_", ",", "\[CapitalDelta]_", 
     ",", "b_", ",", "v_", ",", "xm_"}], "]"}], ":=", 
   RowBox[{
    FractionBox["1", 
     RowBox[{"16", " ", 
      SuperscriptBox[
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], "2"], " ", 
      "\[Alpha]"}]], 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"-", "4"}], " ", 
       SuperscriptBox["\[Alpha]", "3"], " ", "v"}], "+", 
      RowBox[{"2", " ", "b", " ", "\[Rho]l", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"4", " ", "xm"}], "+", 
         RowBox[{"3", " ", "\[CapitalDelta]"}], "+", 
         RowBox[{"b", " ", "\[Rho]l"}]}], ")"}]}], "+", 
      RowBox[{"v", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"4", " ", "xm"}], "+", 
         RowBox[{"6", " ", "b", " ", "\[Rho]l"}]}], ")"}]}], "+", 
      RowBox[{
       SuperscriptBox["\[Alpha]", "2"], " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"2", " ", "b", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "1"}], "+", 
            RowBox[{"4", " ", "\[CapitalDelta]"}]}], ")"}], " ", "\[Rho]l"}], 
         "+", 
         RowBox[{"8", " ", "v", " ", 
          RowBox[{"(", 
           RowBox[{"1", "+", "xm", "+", 
            RowBox[{"b", " ", "\[Rho]l"}]}], ")"}]}]}], ")"}]}], "-", 
      RowBox[{"\[Alpha]", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"b", " ", "\[Rho]l", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "2"}], "+", 
            RowBox[{"12", " ", "xm"}], "+", 
            RowBox[{"14", " ", "\[CapitalDelta]"}], "+", 
            RowBox[{"3", " ", "b", " ", "\[Rho]l"}]}], ")"}]}], "+", 
         RowBox[{"2", " ", "v", " ", 
          RowBox[{"(", 
           RowBox[{"2", "+", 
            RowBox[{"6", " ", "xm"}], "+", 
            RowBox[{"7", " ", "b", " ", "\[Rho]l"}]}], ")"}]}]}], ")"}]}]}], 
     ")"}]}]}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Print", "[", 
   RowBox[{
   "\"\<Party L: difference between expected utility between holding \
primaries and not, given R has no primary (function \>\"", ",", 
    RowBox[{"Style", "[", 
     RowBox[{"\"\<LbrRnoprimary\>\"", ",", "Purple"}], "]"}], ",", 
    "\"\<): \>\""}], "]"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Simplify", "[", 
   RowBox[{
    RowBox[{"LLprimaryobjE", "[", 
     RowBox[{
     "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "xm"}], "]"}],
     "-", 
    RowBox[{"L0primary", "[", 
     RowBox[{"qL0primary", ",", "qR0primary", ",", "xm"}], "]"}]}], "]"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"LbrRnoprimary", "[", 
    RowBox[{
    "\[Rho]_", ",", "\[Rho]l_", ",", "\[Alpha]_", ",", "\[CapitalDelta]_", 
     ",", "b_", ",", "v_", ",", "xm_"}], "]"}], ":=", 
   RowBox[{
    FractionBox["1", 
     RowBox[{"16", " ", 
      SuperscriptBox[
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], "2"], " ", 
      "\[Alpha]"}]], 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"-", "4"}], " ", 
       SuperscriptBox["\[Alpha]", "3"], " ", "v"}], "+", 
      RowBox[{"2", " ", "b", " ", "\[Rho]l", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"4", " ", "xm"}], "+", 
         RowBox[{"3", " ", "\[CapitalDelta]"}], "-", 
         RowBox[{"b", " ", "\[Rho]l"}]}], ")"}]}], "+", 
      RowBox[{"4", " ", "v", " ", 
       RowBox[{"(", 
        RowBox[{"xm", "+", 
         RowBox[{"b", " ", "\[Rho]l"}]}], ")"}]}], "+", 
      RowBox[{
       SuperscriptBox["\[Alpha]", "2"], " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"2", " ", "b", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "1"}], "+", 
            RowBox[{"4", " ", "\[CapitalDelta]"}]}], ")"}], " ", "\[Rho]l"}], 
         "+", 
         RowBox[{"4", " ", "v", " ", 
          RowBox[{"(", 
           RowBox[{"2", "+", 
            RowBox[{"2", " ", "xm"}], "+", 
            RowBox[{"b", " ", "\[Rho]l"}]}], ")"}]}]}], ")"}]}], "-", 
      RowBox[{"\[Alpha]", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"b", " ", "\[Rho]l", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "2"}], "+", 
            RowBox[{"12", " ", "xm"}], "+", 
            RowBox[{"14", " ", "\[CapitalDelta]"}], "-", 
            RowBox[{"3", " ", "b", " ", "\[Rho]l"}]}], ")"}]}], "+", 
         RowBox[{"4", " ", "v", " ", 
          RowBox[{"(", 
           RowBox[{"1", "+", 
            RowBox[{"3", " ", "xm"}], "+", 
            RowBox[{"2", " ", "b", " ", "\[Rho]l"}]}], ")"}]}]}], ")"}]}]}], 
     ")"}]}]}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "Parametric assumptions for Markov Chain analysis", "Subsection",
   ExpressionUUID->"ee23ec84-b538-4036-99b5-9b35c5ce54a2"], " ", 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{"Print", "[", 
  RowBox[{"Style", "[", 
   RowBox[{
   "\"\<Parametric assumptions for simulation. For the results reported in \
the robustness analyses in the Appendix, reset the values of v, \[Alpha], and \
b as indicated.\>\"", ",", " ", "Red"}], " ", "]"}], 
  "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"v", " ", "=", " ", "0.5"}], ";", " ", 
   RowBox[{"(*", " ", 
    RowBox[{
     RowBox[{"Appendix", ":", " ", "v"}], " ", "=", " ", "1"}], " ", "*)"}], 
   "\[IndentingNewLine]", 
   RowBox[{"\[Alpha]", " ", "=", " ", "12"}], ";", " ", 
   RowBox[{"(*", " ", 
    RowBox[{
     RowBox[{"Appendix", ":", " ", "\[Alpha]"}], " ", "=", " ", "10"}], " ", 
    "*)"}], "\[IndentingNewLine]", 
   RowBox[{"b", " ", "=", " ", "2.5"}], ";", " ", 
   RowBox[{"(*", " ", 
    RowBox[{
     RowBox[{"Appendix", ":", " ", "b"}], " ", "=", " ", "3"}], " ", "*)"}], 
   "\[IndentingNewLine]", 
   RowBox[{"Print", "[", 
    RowBox[{
    "\"\<Throughout, make the following parametric assumptions: v = \>\"", 
     ",", " ", "v", ",", "\[IndentingNewLine]", "\"\<, \[Alpha] = \>\"", ",", 
     " ", "\[Alpha]", ",", " ", "\"\<, b = \>\"", ",", " ", "b", ",", 
     "\"\<.\>\""}], "]"}]}], "\[IndentingNewLine]", 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "Define probabilities of general election victory. ", "Subsection",
   ExpressionUUID->"c3a1ac91-1494-42eb-9981-27abef26a79f"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{"Print", "[", 
  RowBox[{"Style", "[", 
   RowBox[{"\"\<\\nMarkov Chain analysis\>\"", ",", "Red"}], "]"}], 
  "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
  "Print", "[", 
   "\"\<States are of the form (w,p,c), where w \[Element] {l,m,h} is median \
voter this period, p \[Element] {l,r} is party of loser last period, and c \
\[Element] {e,p} is candidate selection mechanism of this period's incumbent \
(i.e. last period's winner, who can't change her mechanism.\>\"", "]"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{"Print", "[", 
  "\"\<Probability of ideological transition to another median is \[Delta], \
which is a measure of incumbency disadvantage\>\"", 
  "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"Clear", "[", "\[Delta]", "]"}], ";"}], "\[IndentingNewLine]", 
  RowBox[{"(*", " ", 
   RowBox[{
    RowBox[{
     RowBox[{
     "For", " ", "the", " ", "example", " ", "with", " ", "\[CapitalDelta]"}],
      " ", "=", " ", "6"}], ",", " ", 
    RowBox[{
     RowBox[{"|", "w", "|"}], "=", "1"}], ",", " ", 
    RowBox[{"if", " ", 
     RowBox[{"(", 
      RowBox[{"w", ",", "p", ",", "c"}], ")"}], " ", "causes", " ", "party", 
     " ", "p", " ", "to", " ", "choose", " ", 
     RowBox[{"c", "'"}]}], ",", " ", 
    RowBox[{
     RowBox[{
     "when", " ", "probability", " ", "of", " ", "transitioning", " ", "to", 
      " ", "wp", 
      RowBox[{"(", 
       RowBox[{"not", " ", "c"}], ")"}]}], " ", "=", " ", 
     RowBox[{
      RowBox[{
      "0", " ", "since", " ", "p", " ", "has", " ", "lost", " ", "again", " ",
        "and", " ", "must", " ", "face", " ", "incumbent", " ", "who", " ", 
       "repeats", " ", 
       RowBox[{"c", ".", "  ", "Also"}], " ", "probability", " ", "of", " ", 
       "transitioning", " ", "to", " ", "w", 
       RowBox[{"(", 
        RowBox[{"not", " ", "p"}], ")"}], 
       RowBox[{"(", 
        RowBox[{"not", " ", 
         RowBox[{"c", "'"}]}], ")"}]}], " ", "=", " ", 
      RowBox[{
      "0", " ", "since", " ", "by", " ", "winning", " ", "p", " ", "must", 
       " ", "choose", " ", 
       RowBox[{"c", "'"}], " ", 
       RowBox[{"again", "."}]}]}]}]}], " ", "*)"}], "\[IndentingNewLine]", 
  "\[IndentingNewLine]", 
  RowBox[{"(*", " ", 
   RowBox[{
    RowBox[{
     RowBox[{"Let", "'"}], "s", " ", "note", " ", "the", " ", "equilibrium", 
     " ", "choices", " ", "for", " ", "each", " ", 
     RowBox[{"state", ":", "\[IndentingNewLine]", 
      RowBox[{"{", 
       RowBox[{
       "lle", ",", "llp", ",", "lre", ",", "lrp", ",", "mle", ",", "mlp", ",",
         "mre", ",", "mrp", ",", "hle", ",", "hlp", ",", "hre", ",", "hrp"}], 
       "}"}]}]}], " ", "\[Rule]", " ", "\[IndentingNewLine]", "  ", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"e", ",", "e"}], ")"}], ",", 
      RowBox[{"(", 
       RowBox[{"e", ",", "p"}], ")"}], ",", 
      RowBox[{"(", 
       RowBox[{"e", ",", "p"}], ")"}], ",", 
      RowBox[{"(", 
       RowBox[{"p", ",", "p"}], ")"}], ",", 
      RowBox[{"(", 
       RowBox[{"p", ",", "e"}], ")"}], ",", 
      RowBox[{"(", 
       RowBox[{"p", ",", "p"}], ")"}], ",", 
      RowBox[{"(", 
       RowBox[{"e", ",", "p"}], ")"}], ",", 
      RowBox[{"(", 
       RowBox[{"p", ",", "p"}], ")"}], ",", 
      RowBox[{"(", 
       RowBox[{"p", ",", "e"}], ")"}], ",", 
      RowBox[{"(", 
       RowBox[{"p", ",", "p"}], ")"}], ",", 
      RowBox[{"(", 
       RowBox[{"e", ",", "e"}], ")"}], ",", 
      RowBox[{"(", 
       RowBox[{"p", ",", "e"}], ")"}]}], "}"}]}], "\[IndentingNewLine]", 
   "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", 
  RowBox[{"(*", " ", 
   RowBox[{
   "Also", " ", "write", " ", "down", " ", "probability", " ", "of", " ", 
    "victory", " ", "for", " ", "each", " ", "possible", " ", "profile", " ", 
    "of", " ", 
    RowBox[{"platforms", ".", " ", "These"}], " ", "are", " ", "adapted", " ",
     "from", " ", "the", " ", "objective", " ", "functions", " ", "above", 
    " ", "and", " ", "require", " ", "a", " ", "version", " ", "of", " ", 
    "PrRwin", " ", "that", " ", "depends", " ", "on", " ", 
    RowBox[{"w", "."}]}], " ", "*)"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"PrRwinw", "[", 
    RowBox[{"ql_", ",", "qr_", ",", "w_"}], "]"}], ":=", 
   RowBox[{
    FractionBox["1", "2"], "+", 
    FractionBox["w", "\[Alpha]"], "+", 
    FractionBox[
     RowBox[{"qr", "-", "ql"}], 
     RowBox[{"2", " ", "\[Alpha]", " "}]]}]}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"Rprobobj", "[", 
    RowBox[{"ql_", ",", "bl_", ",", "qr_", ",", "br_", ",", "w_"}], "]"}], ":=", 
   RowBox[{"PrRwinw", "[", 
    RowBox[{
     RowBox[{"ql", "+", "bl"}], ",", 
     RowBox[{"qr", "+", "br"}], ",", "w"}], "]"}]}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"PrRwin0", "[", 
   RowBox[{"ql_", ",", "qr_", ",", "w_"}], "]"}], ":=", 
  RowBox[{
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "\[Rho]"}], ")"}], 
    RowBox[{"(", 
     RowBox[{"1", "-", "\[Rho]l"}], ")"}], 
    RowBox[{"Rprobobj", "[", 
     RowBox[{"ql", ",", "0", ",", "qr", ",", "0", ",", "w"}], "]"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "\[Rho]"}], ")"}], "\[Rho]l", " ", 
    RowBox[{"Rprobobj", "[", 
     RowBox[{"ql", ",", "b", ",", "qr", ",", "0", ",", "w"}], "]"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "\[Rho]l"}], ")"}], "\[Rho]", " ", 
    RowBox[{"Rprobobj", "[", 
     RowBox[{"ql", ",", "0", ",", "qr", ",", "b", ",", "w"}], "]"}]}], "+", 
   RowBox[{"\[Rho]", " ", "\[Rho]l", " ", 
    RowBox[{"Rprobobj", "[", 
     RowBox[{"ql", ",", "b", ",", "qr", ",", "b", ",", "w"}], 
     "]"}]}]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"PrLwin0", "[", 
   RowBox[{"ql_", ",", "qr_", ",", "w_"}], "]"}], ":=", 
  RowBox[{"1", "-", 
   RowBox[{"PrRwin0", "[", 
    RowBox[{"ql", ",", "qr", ",", "w"}], "]"}]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"PrRwinR", "[", 
   RowBox[{"ql_", ",", "qre_", ",", "qrn_", ",", "w_"}], "]"}], ":=", 
  RowBox[{
   RowBox[{"m", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "\[Rho]l"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]"}]}], ")"}], 
          RowBox[{"Rprobobj", "[", 
           RowBox[{"ql", ",", "0", ",", "qre", ",", "0", ",", "w"}], "]"}]}], 
         "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Rprobobj", "[", 
           RowBox[{"ql", ",", "0", ",", "qre", ",", "b", ",", "w"}], "]"}]}], 
         "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Rprobobj", "[", 
           RowBox[{"ql", ",", "0", ",", "qrn", ",", "b", ",", "w"}], 
           "]"}]}]}], ")"}]}], "+", 
      RowBox[{"\[Rho]l", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]"}]}], ")"}], 
          RowBox[{"Rprobobj", "[", 
           RowBox[{"ql", ",", "b", ",", "qre", ",", "0", ",", "w"}], "]"}]}], 
         "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Rprobobj", "[", 
           RowBox[{"ql", ",", "b", ",", "qre", ",", "b", ",", "w"}], "]"}]}], 
         "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Rprobobj", "[", 
           RowBox[{"ql", ",", "b", ",", "qrn", ",", "b", ",", "w"}], 
           "]"}]}]}], ")"}]}]}], ")"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "m"}], ")"}], 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "\[Rho]l"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]"}]}], ")"}], 
          RowBox[{"Rprobobj", "[", 
           RowBox[{"ql", ",", "0", ",", "qrn", ",", "0", ",", "w"}], "]"}]}], 
         "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Rprobobj", "[", 
           RowBox[{"ql", ",", "0", ",", "qrn", ",", "b", ",", "w"}], "]"}]}], 
         "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Rprobobj", "[", 
           RowBox[{"ql", ",", "0", ",", "qre", ",", "b", ",", "w"}], 
           "]"}]}]}], ")"}]}], "+", 
      RowBox[{"\[Rho]l", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]"}]}], ")"}], 
          RowBox[{"Rprobobj", "[", 
           RowBox[{"ql", ",", "b", ",", "qrn", ",", "0", ",", "w"}], "]"}]}], 
         "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Rprobobj", "[", 
           RowBox[{"ql", ",", "b", ",", "qrn", ",", "b", ",", "w"}], "]"}]}], 
         "+", 
         RowBox[{"\[Rho]", " ", 
          RowBox[{"Rprobobj", "[", 
           RowBox[{"ql", ",", "b", ",", "qre", ",", "b", ",", "w"}], 
           "]"}]}]}], ")"}]}]}], ")"}]}]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"PrLwinR", "[", 
   RowBox[{"ql_", ",", "qre_", ",", "qrn_", ",", "w_"}], "]"}], ":=", 
  RowBox[{"1", "-", 
   RowBox[{"PrRwinR", "[", 
    RowBox[{"ql", ",", "qre", ",", "qrn", ",", "w"}], 
    "]"}]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"PrRwinL", "[", 
   RowBox[{"qle_", ",", "qln_", ",", "qr_", ",", "w_"}], "]"}], ":=", 
  RowBox[{
   RowBox[{"ml", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "\[Rho]"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"Rprobobj", "[", 
           RowBox[{"qle", ",", "0", ",", "qr", ",", "0", ",", "w"}], "]"}]}], 
         "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Rprobobj", "[", 
           RowBox[{"qle", ",", "b", ",", "qr", ",", "0", ",", "w"}], "]"}]}], 
         "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Rprobobj", "[", 
           RowBox[{"qln", ",", "b", ",", "qr", ",", "0", ",", "w"}], 
           "]"}]}]}], ")"}]}], "+", 
      RowBox[{"\[Rho]", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"Rprobobj", "[", 
           RowBox[{"qle", ",", "0", ",", "qr", ",", "b", ",", "w"}], "]"}]}], 
         "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Rprobobj", "[", 
           RowBox[{"qle", ",", "b", ",", "qr", ",", "b", ",", "w"}], "]"}]}], 
         "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Rprobobj", "[", 
           RowBox[{"qln", ",", "b", ",", "qr", ",", "b", ",", "w"}], 
           "]"}]}]}], ")"}]}]}], ")"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "ml"}], ")"}], 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "\[Rho]"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"Rprobobj", "[", 
           RowBox[{"qln", ",", "0", ",", "qr", ",", "0", ",", "w"}], "]"}]}], 
         "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Rprobobj", "[", 
           RowBox[{"qln", ",", "b", ",", "qr", ",", "0", ",", "w"}], "]"}]}], 
         "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Rprobobj", "[", 
           RowBox[{"qle", ",", "b", ",", "qr", ",", "0", ",", "w"}], 
           "]"}]}]}], ")"}]}], "+", 
      RowBox[{"\[Rho]", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"Rprobobj", "[", 
           RowBox[{"qln", ",", "0", ",", "qr", ",", "b", ",", "w"}], "]"}]}], 
         "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Rprobobj", "[", 
           RowBox[{"qln", ",", "b", ",", "qr", ",", "b", ",", "w"}], "]"}]}], 
         "+", 
         RowBox[{"\[Rho]l", " ", 
          RowBox[{"Rprobobj", "[", 
           RowBox[{"qle", ",", "b", ",", "qr", ",", "b", ",", "w"}], 
           "]"}]}]}], ")"}]}]}], ")"}]}]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"PrLwinL", "[", 
   RowBox[{"qle_", ",", "qln_", ",", "qr_", ",", "w_"}], "]"}], ":=", 
  RowBox[{"1", "-", 
   RowBox[{"PrRwinL", "[", 
    RowBox[{"qle", ",", "qln", ",", "qr", ",", "w"}], 
    "]"}]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"PrRwin2", "[", 
   RowBox[{"qle_", ",", "qln_", ",", "qre_", ",", "qrn_", ",", "w_"}], "]"}], 
  ":=", 
  RowBox[{
   RowBox[{"ml", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"m", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qle", ",", "0", ",", "qre", ",", "0", ",", "w"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qle", ",", "0", ",", "qre", ",", "b", ",", "w"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qle", ",", "0", ",", "qrn", ",", "b", ",", "w"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qle", ",", "b", ",", "qre", ",", "0", ",", "w"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qle", ",", "b", ",", "qre", ",", "b", ",", "w"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qle", ",", "b", ",", "qrn", ",", "b", ",", "w"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qln", ",", "b", ",", "qre", ",", "0", ",", "w"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qln", ",", "b", ",", "qre", ",", "b", ",", "w"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qln", ",", "b", ",", "qrn", ",", "b", ",", "w"}], 
              "]"}]}]}], ")"}]}]}], ")"}]}], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "m"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qle", ",", "0", ",", "qrn", ",", "0", ",", "w"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qle", ",", "0", ",", "qrn", ",", "b", ",", "w"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qle", ",", "0", ",", "qre", ",", "b", ",", "w"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qle", ",", "b", ",", "qrn", ",", "0", ",", "w"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qle", ",", "b", ",", "qrn", ",", "b", ",", "w"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qle", ",", "b", ",", "qre", ",", "b", ",", "w"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qln", ",", "b", ",", "qrn", ",", "0", ",", "w"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qln", ",", "b", ",", "qrn", ",", "b", ",", "w"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qln", ",", "b", ",", "qre", ",", "b", ",", "w"}], 
              "]"}]}]}], ")"}]}]}], ")"}]}]}], ")"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", "ml"}], ")"}], 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"m", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qln", ",", "0", ",", "qre", ",", "0", ",", "w"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qln", ",", "0", ",", "qre", ",", "b", ",", "w"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qln", ",", "0", ",", "qrn", ",", "b", ",", "w"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qln", ",", "b", ",", "qre", ",", "0", ",", "w"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qln", ",", "b", ",", "qre", ",", "b", ",", "w"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qln", ",", "b", ",", "qrn", ",", "b", ",", "w"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qle", ",", "b", ",", "qre", ",", "0", ",", "w"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qle", ",", "b", ",", "qre", ",", "b", ",", "w"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qle", ",", "b", ",", "qrn", ",", "b", ",", "w"}], 
              "]"}]}]}], ")"}]}]}], ")"}]}], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "m"}], ")"}], 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Rho]l"}]}], ")"}], 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qln", ",", "0", ",", "qrn", ",", "0", ",", "w"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qln", ",", "0", ",", "qrn", ",", "b", ",", "w"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qln", ",", "0", ",", "qre", ",", "b", ",", "w"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qln", ",", "b", ",", "qrn", ",", "0", ",", "w"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qln", ",", "b", ",", "qrn", ",", "b", ",", "w"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qln", ",", "b", ",", "qre", ",", "b", ",", "w"}], 
              "]"}]}]}], ")"}]}], "+", 
         RowBox[{"\[Rho]l", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "-", 
               RowBox[{"2", "\[Rho]"}]}], ")"}], 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qle", ",", "b", ",", "qrn", ",", "0", ",", "w"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qle", ",", "b", ",", "qrn", ",", "b", ",", "w"}], 
              "]"}]}], "+", 
            RowBox[{"\[Rho]", " ", 
             RowBox[{"Rprobobj", "[", 
              RowBox[{"qle", ",", "b", ",", "qre", ",", "b", ",", "w"}], 
              "]"}]}]}], ")"}]}]}], ")"}]}]}], 
     ")"}]}]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"PrLwin2", "[", 
    RowBox[{"qle_", ",", "qln_", ",", "qre_", ",", "qrn_", ",", "w_"}], "]"}],
    ":=", 
   RowBox[{"1", "-", 
    RowBox[{"PrRwin2", "[", 
     RowBox[{"qle", ",", "qln", ",", "qre", ",", "qrn", ",", "w"}], "]"}]}]}],
   "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{Cell[
  "Load parameter sets for simulation.", "Subsection",ExpressionUUID->
   "6e938dcc-04c5-4b31-84b0-e4716c931e12"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Print", "[", 
   RowBox[{"Style", "[", 
    RowBox[{
    "\"\<Load parameter sets for use in the simulation. If an error occurs, \
your working directory is not set correctly. See Step 1 for more information.\
\>\"", ",", " ", "Red"}], "]"}], "]"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{"mat", " ", "=", " ", 
  RowBox[{
  "Import", "[", "\"\<06_dp_params3.csv\>\"", 
   "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"Dimensions", "[", "mat", "]"}], "\[IndentingNewLine]", 
 RowBox[{"mat", "[", "1", "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"xm", " ", "=", " ", "0"}], ";"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{"Print", "[", "\"\<Create vectors to hold simulation results.\>\"", 
  "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"datapoints", "  ", "=", " ", "87423"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"noprimaries", "=", 
   RowBox[{"Table", "[", 
    RowBox[{"5", ",", "datapoints"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Lprimary", "=", 
   RowBox[{"Table", "[", 
    RowBox[{"5", ",", "datapoints"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Rprimary", "=", 
   RowBox[{"Table", "[", 
    RowBox[{"5", ",", "datapoints"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"twoprimaries", "=", 
   RowBox[{"Table", "[", 
    RowBox[{"5", ",", "datapoints"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"incprimary", "=", 
   RowBox[{"Table", "[", 
    RowBox[{"5", ",", "datapoints"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"chalprimary", "=", 
   RowBox[{"Table", "[", 
    RowBox[{"5", ",", "datapoints"}], "]"}]}], ";"}], "\n"}], "Input",
 CellChangeTimes->{{3.6556969045495787`*^9, 3.655696948342016*^9}, {
   3.6556970857692633`*^9, 3.655697161728763*^9}, 3.655697214494525*^9, {
   3.655697513463725*^9, 3.65569759350391*^9}, {3.65569766750572*^9, 
   3.655697680007352*^9}, {3.655697714017119*^9, 3.6556977250195436`*^9}, {
   3.655698897913082*^9, 3.655698969862565*^9}, {3.6556994348704*^9, 
   3.655699488860113*^9}, {3.6556996147333593`*^9, 3.6556997190950527`*^9}, {
   3.655699830557543*^9, 3.655699864837134*^9}, {3.655700084943285*^9, 
   3.655700145871683*^9}, {3.655700203842985*^9, 3.65570021610183*^9}, {
   3.6557002877921867`*^9, 3.655700798668092*^9}, {3.6557008809874983`*^9, 
   3.655700998104813*^9}, {3.655701083666519*^9, 3.655701218369318*^9}, {
   3.6557012627805977`*^9, 3.655701352195424*^9}, {3.655701400083418*^9, 
   3.6557015528490973`*^9}, {3.6557016052288017`*^9, 3.655701683919537*^9}, {
   3.6557017416732893`*^9, 3.655701809756523*^9}, {3.655701939250244*^9, 
   3.655701959040605*^9}, {3.655702033850402*^9, 3.655702042635998*^9}, {
   3.655702087632134*^9, 3.655702129095551*^9}, {3.655744066333323*^9, 
   3.6557441064909286`*^9}, {3.655744175114567*^9, 3.655744459315431*^9}, {
   3.6557445187667294`*^9, 3.655744615603661*^9}, {3.655744657996176*^9, 
   3.655744666090041*^9}, {3.65574471201794*^9, 3.655744746279996*^9}, {
   3.6557448632204113`*^9, 3.6557448646474667`*^9}, {3.655746691819242*^9, 
   3.655746708399412*^9}, {3.6557468872017097`*^9, 3.655746935976253*^9}, {
   3.655747031418078*^9, 3.65574703720076*^9}, {3.655747139019821*^9, 
   3.655747160641302*^9}, {3.6557472417538357`*^9, 3.655747245786399*^9}, {
   3.6557472943783607`*^9, 3.655747353199794*^9}, {3.655747946573283*^9, 
   3.655747962426811*^9}, {3.655748052135418*^9, 3.6557482678866796`*^9}, {
   3.655748492487506*^9, 3.6557486523875837`*^9}, {3.655748709444124*^9, 
   3.655748898980624*^9}, {3.655779110999722*^9, 3.655779145443544*^9}, {
   3.65577917649615*^9, 3.655779251276925*^9}, {3.6557792878960657`*^9, 
   3.655779299215254*^9}, {3.655779364775825*^9, 3.65577943320492*^9}, {
   3.65577947228869*^9, 3.655779476666627*^9}, {3.65577961816082*^9, 
   3.6557796647346888`*^9}, {3.655779723662045*^9, 3.655779770632847*^9}, {
   3.655779850985765*^9, 3.6557798872434*^9}, {3.655780174294258*^9, 
   3.6557801961537733`*^9}, {3.6557804937421837`*^9, 3.655780524215558*^9}, {
   3.6557805854950953`*^9, 3.655780603663232*^9}, {3.6557806448403788`*^9, 
   3.6557806578512278`*^9}, {3.655780693067786*^9, 3.655780730704965*^9}, {
   3.6557807707114964`*^9, 3.655780772043721*^9}, {3.6557808677908783`*^9, 
   3.655780973469843*^9}, {3.655781455923595*^9, 3.6557814655086727`*^9}, 
   3.655781540304638*^9, {3.6557826633975077`*^9, 3.655782724589387*^9}, {
   3.655783323627974*^9, 3.655783391255227*^9}, {3.6557839520782003`*^9, 
   3.655784014214223*^9}, {3.6557841885482273`*^9, 3.655784273304399*^9}, {
   3.6557844297919817`*^9, 3.65578449584048*^9}, {3.655784920107821*^9, 
   3.655784936661912*^9}, {3.655784999941584*^9, 3.6557850071103*^9}, {
   3.655785149404916*^9, 3.655785195134634*^9}, {3.655785275065568*^9, 
   3.6557852903596077`*^9}, {3.65578564124203*^9, 3.655785690799816*^9}, {
   3.6557857353912363`*^9, 3.655785795077847*^9}, {3.655785827589326*^9, 
   3.655785848354851*^9}, {3.655786060188362*^9, 3.655786063539495*^9}, {
   3.655786226101776*^9, 3.6557862965437813`*^9}, {3.6557863876307697`*^9, 
   3.655786392946278*^9}, {3.655786559223537*^9, 3.655786575134231*^9}, {
   3.6557872297693653`*^9, 3.655787252266862*^9}, {3.655787328129447*^9, 
   3.655787392303783*^9}, {3.655787512301564*^9, 3.65578753108148*^9}, 
   3.655787658575609*^9, {3.6557876892987013`*^9, 3.655787731215684*^9}, {
   3.655787983720475*^9, 3.655787990856142*^9}, {3.655788033376727*^9, 
   3.655788037154777*^9}, {3.655788113780545*^9, 3.655788134489586*^9}, {
   3.655788177780504*^9, 3.655788252461755*^9}, {3.6557883377219667`*^9, 
   3.655788406050454*^9}, {3.655834437163148*^9, 3.6558344374276752`*^9}, {
   3.6558365584074*^9, 3.655836558507166*^9}, 3.655836965806882*^9, {
   3.656443970652401*^9, 3.656444012291102*^9}, {3.656444110373949*^9, 
   3.656444127860427*^9}, {3.656444335613316*^9, 3.656444443158476*^9}, {
   3.656444578586463*^9, 3.656444620270113*^9}, {3.656444711666729*^9, 
   3.656444721417533*^9}, {3.65644476547997*^9, 3.65644477228515*^9}, {
   3.656474509489209*^9, 3.656474611357772*^9}, {3.656474661509121*^9, 
   3.65647471510997*^9}, {3.656474907521687*^9, 3.6564749278471613`*^9}, {
   3.6564750391891003`*^9, 3.6564750439652*^9}, {3.656475074502075*^9, 
   3.656475081357016*^9}, 3.656475119024795*^9, 3.656475157606414*^9, {
   3.656475355128993*^9, 3.656475366188363*^9}, {3.656475527702195*^9, 
   3.656475544874825*^9}, {3.6564765305589867`*^9, 3.656476544905654*^9}, {
   3.656476758871916*^9, 3.656476796995449*^9}, {3.656479386724381*^9, 
   3.656479389331829*^9}, {3.6564795351462297`*^9, 3.65647954535236*^9}, {
   3.656479598988964*^9, 3.656479648927223*^9}, {3.6564796820504017`*^9, 
   3.656479696641938*^9}, {3.6564797333796463`*^9, 3.656479951896508*^9}, 
   3.656480038384046*^9, {3.65648007137309*^9, 3.6564800963629827`*^9}, 
   3.656480225688141*^9, {3.656480308847281*^9, 3.656480420484234*^9}, {
   3.656480650538151*^9, 3.656480755719294*^9}, {3.656480839444726*^9, 
   3.656480858587591*^9}, 3.6564808941110563`*^9, {3.6565645412588787`*^9, 
   3.656564560200672*^9}, {3.656564599262755*^9, 3.656564626351812*^9}, {
   3.656564666611518*^9, 3.656564685381269*^9}, 3.656564734050688*^9, {
   3.656567073318323*^9, 3.6565670901380377`*^9}, {3.656567133344804*^9, 
   3.656567160547975*^9}, {3.6565672978031797`*^9, 3.656567299574399*^9}, {
   3.6565677238535*^9, 3.656567775423768*^9}, {3.656567808310503*^9, 
   3.656567815550397*^9}, 3.656567895147842*^9, 3.656567927083281*^9, 
   3.6565679594670353`*^9, {3.656567994729938*^9, 3.656568147609496*^9}, {
   3.656568190448594*^9, 3.656568299389679*^9}, 3.656568470149192*^9, {
   3.656568550919259*^9, 3.6565686279740877`*^9}, {3.656568723652186*^9, 
   3.656568732051841*^9}, {3.656568772338716*^9, 3.656568791138753*^9}, {
   3.6565688831037607`*^9, 3.656568951005419*^9}, {3.656568998913699*^9, 
   3.656569062375802*^9}, 3.6565991968854923`*^9, {3.656599229548421*^9, 
   3.656599269499651*^9}, 3.656599778910634*^9, {3.656602085123723*^9, 
   3.656602128896946*^9}, {3.656602196848732*^9, 3.656602230509688*^9}, {
   3.656602261452573*^9, 3.6566023128154373`*^9}, {3.6566024152428303`*^9, 
   3.656602415811593*^9}, {3.656602701188323*^9, 3.65660270492973*^9}, {
   3.65660273744816*^9, 3.656602743990909*^9}, {3.6566027987302732`*^9, 
   3.65660281212994*^9}, {3.6566028424683743`*^9, 3.65660284465926*^9}, {
   3.6566029152582483`*^9, 3.656602934026082*^9}, 3.65660308851546*^9, {
   3.656603183864913*^9, 3.656603190641493*^9}, {3.656603224909052*^9, 
   3.656603228757324*^9}, {3.656603349745324*^9, 3.656603412647931*^9}, {
   3.656603475732348*^9, 3.656603502249844*^9}, {3.656603604202389*^9, 
   3.656603710719249*^9}, {3.656603792078651*^9, 3.656603841591642*^9}, {
   3.6566038817216673`*^9, 3.656603920278763*^9}, {3.65660397560846*^9, 
   3.656604000903378*^9}, {3.656604695467661*^9, 3.6566047659404993`*^9}, {
   3.6566048040687237`*^9, 3.656604867062207*^9}, {3.656610094609708*^9, 
   3.656610096912027*^9}, 3.656610593395219*^9, 3.6566114661103573`*^9, 
   3.656611707852213*^9, {3.6566122950792933`*^9, 3.656612347886999*^9}, {
   3.656624665128845*^9, 3.656624744452305*^9}, 3.656695448027432*^9, {
   3.656695757248652*^9, 3.6566957619727077`*^9}, {3.656695792140415*^9, 
   3.65669586145362*^9}, {3.656695928894565*^9, 3.656695945975415*^9}, {
   3.661023583564548*^9, 3.661023625549798*^9}, {3.6610555250442247`*^9, 
   3.661055553537571*^9}, {3.661056162299157*^9, 3.661056219154682*^9}, 
   3.661056366195716*^9, {3.661056409015252*^9, 3.661056470473908*^9}, {
   3.661056514482748*^9, 3.661056649695445*^9}, {3.661056711225555*^9, 
   3.661056818831669*^9}, {3.6610568651342163`*^9, 3.6610569621476917`*^9}, {
   3.661057051575919*^9, 3.6610571558805103`*^9}, {3.661057789077402*^9, 
   3.6610578242415524`*^9}, {3.661058197523364*^9, 3.661058197634058*^9}, {
   3.661058598186194*^9, 3.661058617717147*^9}, {3.661059023487361*^9, 
   3.6610590685867643`*^9}, {3.661196325106153*^9, 3.661196343538898*^9}, {
   3.6612281950085897`*^9, 3.661228229667182*^9}, {3.661229192924473*^9, 
   3.661229208831953*^9}, {3.661229361228341*^9, 3.66122937995929*^9}, {
   3.663605426866475*^9, 3.6636054275974216`*^9}, {3.664301828135516*^9, 
   3.664301940255706*^9}, 3.664303988973629*^9, {3.6643040743572397`*^9, 
   3.664304114866682*^9}, {3.664304180673052*^9, 3.664304180751899*^9}, {
   3.6643042381741047`*^9, 3.664304275603153*^9}, {3.665364010690982*^9, 
   3.665364048677452*^9}, 3.66536464991103*^9, {3.6654178091159163`*^9, 
   3.665417829861264*^9}, {3.66541805215619*^9, 3.665418071382758*^9}, {
   3.665418176900446*^9, 3.665418183553877*^9}, {3.665418467655634*^9, 
   3.665418478016315*^9}, {3.6656953507307568`*^9, 3.66569535682023*^9}, {
   3.6656954064672203`*^9, 3.665695407731065*^9}, 3.665894959531279*^9, {
   3.665978393515964*^9, 3.665978406008376*^9}, {3.665978436617187*^9, 
   3.66597846961556*^9}, 3.665978522076048*^9, {3.6659785551619*^9, 
   3.665978565390005*^9}, {3.6661549840674877`*^9, 3.666155008129917*^9}, {
   3.6661550597659283`*^9, 3.666155088758397*^9}, 3.666155119134183*^9, {
   3.666155844780158*^9, 3.666155883143176*^9}, 3.666155945272677*^9, {
   3.6661559773607073`*^9, 3.6661560030480757`*^9}, 3.6661566715783*^9, {
   3.66615671124839*^9, 3.666156737824297*^9}, 3.666156771536497*^9, {
   3.666156802381719*^9, 3.666156806557921*^9}, {3.6662199120790997`*^9, 
   3.666219916806625*^9}, {3.6662202378859797`*^9, 3.6662202380622253`*^9}, {
   3.666222602301866*^9, 3.666222663376761*^9}, {3.666224712997427*^9, 
   3.6662247871075068`*^9}, {3.666225356050218*^9, 3.666225360710042*^9}, 
   3.666225606637322*^9, {3.6662397474680433`*^9, 3.6662397523516283`*^9}, {
   3.666240568253304*^9, 3.66624060842279*^9}, {3.666453700947694*^9, 
   3.666453701332995*^9}, {3.6679679250375*^9, 3.667967990762103*^9}, {
   3.667968140463832*^9, 3.6679681492391443`*^9}, {3.668018290598168*^9, 
   3.66801829075908*^9}, {3.66801887891685*^9, 3.6680189005972853`*^9}, {
   3.668018944917727*^9, 3.6680189909672117`*^9}, {3.668019021890527*^9, 
   3.668019044220525*^9}, {3.668019075869595*^9, 3.6680190929559793`*^9}, {
   3.66801915072464*^9, 3.6680191962173557`*^9}, {3.668019234749444*^9, 
   3.668019345377239*^9}, 3.668019393602047*^9, 3.668029637154789*^9, {
   3.668031830293798*^9, 3.668031847829191*^9}, 3.668031923310047*^9, 
   3.668031962905039*^9, 3.668033660623436*^9, 3.66803371403985*^9, 
   3.668033762453415*^9, 3.6680338146139727`*^9, {3.6680338522636003`*^9, 
   3.668033981451724*^9}, 3.668034383558654*^9, {3.6682559460341787`*^9, 
   3.668255949579508*^9}, {3.668353344544366*^9, 3.668353350755664*^9}, 
   3.668353749093267*^9, 3.668353782930604*^9, 3.6683538153563757`*^9, 
   3.668353874261825*^9, 3.668353906366062*^9, 3.668353939949061*^9, 
   3.6683539927878723`*^9, 3.668354051387344*^9, {3.6683541244854603`*^9, 
   3.668354134030307*^9}, {3.668354791606987*^9, 3.668354797882305*^9}, {
   3.668354893741769*^9, 3.66835491601759*^9}, {3.6683549754892197`*^9, 
   3.668354996854433*^9}, {3.668355055521628*^9, 3.668355083170212*^9}, 
   3.668785951411257*^9, 3.668785996275543*^9, 3.668786044718202*^9, 
   3.66878608091442*^9, {3.668787012101677*^9, 3.668787022906549*^9}, {
   3.668787135858787*^9, 3.668787161185461*^9}, {3.67076989727452*^9, 
   3.670769897481184*^9}, {3.67240777878127*^9, 3.672407779140691*^9}, {
   3.672978378139676*^9, 3.6729783786814213`*^9}, {3.673753202670354*^9, 
   3.67375322983908*^9}, {3.673753381610606*^9, 3.673753471039565*^9}, {
   3.673753506113686*^9, 3.6737535102030153`*^9}, {3.673753567434441*^9, 
   3.6737537074040117`*^9}, {3.673753743436824*^9, 3.673753748599249*^9}, {
   3.673753859520747*^9, 3.673753879583106*^9}, {3.6737539319768476`*^9, 
   3.673753938657332*^9}, {3.673754004447267*^9, 3.6737540339094553`*^9}, {
   3.673754117737503*^9, 3.673754237569686*^9}, 3.6737546451445723`*^9, 
   3.673754685366797*^9, 3.673754764835864*^9, 3.673754797226262*^9, 
   3.673754828810038*^9, {3.6737548742629423`*^9, 3.6737549225715313`*^9}, 
   3.673754960551587*^9, {3.67375499495562*^9, 3.673755079478938*^9}, 
   3.673755134673111*^9, {3.6737558265515327`*^9, 3.673755893889888*^9}, {
   3.6738427818316*^9, 3.6738428593011713`*^9}, {3.673843022351122*^9, 
   3.67384303217588*^9}, {3.674226137992115*^9, 3.67422619472686*^9}, {
   3.67422655361826*^9, 3.674226600795897*^9}, {3.674226631430769*^9, 
   3.674226678133148*^9}, {3.674226750127736*^9, 3.674226797694374*^9}, {
   3.674226830535409*^9, 3.674226877047233*^9}, {3.6742330208848057`*^9, 
   3.67423304742671*^9}, 3.674233556995833*^9, {3.674233631795946*^9, 
   3.6742336991897163`*^9}, {3.674233767589295*^9, 3.6742337741981297`*^9}, {
   3.6742341712407084`*^9, 3.674234179849358*^9}, {3.6742346308100767`*^9, 
   3.6742348618901873`*^9}, {3.6742349024269876`*^9, 
   3.6742350351643753`*^9}, {3.674235101078898*^9, 3.6742351470973167`*^9}, {
   3.674235362204145*^9, 3.674235437045094*^9}, {3.674235483423118*^9, 
   3.674235529432592*^9}, {3.6742355633377457`*^9, 3.674235617287084*^9}, {
   3.6742358907146063`*^9, 3.674235991920731*^9}, {3.6742360450894537`*^9, 
   3.674236057779792*^9}, {3.674840346560136*^9, 3.674840386274868*^9}, {
   3.6748404754467382`*^9, 3.6748405426744337`*^9}, {3.674842517940474*^9, 
   3.6748425239849443`*^9}, {3.674842580758582*^9, 3.67484259495463*^9}, {
   3.6748426657914467`*^9, 3.67484266616017*^9}, 3.674842806326234*^9, {
   3.674843089910747*^9, 3.674843185943738*^9}, {3.674844419020769*^9, 
   3.674844807107823*^9}, {3.6748448544287367`*^9, 3.674844879394603*^9}, {
   3.675464979675335*^9, 3.675464988623948*^9}, 3.679768962833537*^9, 
   3.679777146091179*^9, {3.6810628807523737`*^9, 3.6810630070635157`*^9}, {
   3.681063038207281*^9, 3.681063073580675*^9}, {3.681063186304368*^9, 
   3.681063278404393*^9}, {3.681063513219605*^9, 3.681063619767761*^9}, {
   3.6810637884013987`*^9, 3.681063827842473*^9}, {3.681063877243496*^9, 
   3.681063898997061*^9}, 3.6810840816847563`*^9, {3.681084246207885*^9, 
   3.681084247672018*^9}, {3.681094791034171*^9, 3.681094792852931*^9}, {
   3.681094858840102*^9, 3.681094865676208*^9}, {3.68109536525331*^9, 
   3.681095439590947*^9}, 3.6810957442150784`*^9, {3.681095815029809*^9, 
   3.681095917141533*^9}, {3.68109595852535*^9, 3.681095960284712*^9}, {
   3.68109667101359*^9, 3.681096671355466*^9}, {3.681096859344351*^9, 
   3.681097021086933*^9}, {3.681097561004352*^9, 3.681097657618351*^9}, {
   3.681097692049062*^9, 3.681097751689946*^9}, {3.681098074199958*^9, 
   3.681098093780075*^9}, {3.681098251939355*^9, 3.681098279709908*^9}, {
   3.6810986640537987`*^9, 3.681098699347838*^9}, {3.681143252289137*^9, 
   3.681143351644944*^9}, {3.6811434597671432`*^9, 3.681143522406806*^9}, {
   3.6811435657886133`*^9, 3.681143684104453*^9}, {3.681143811010682*^9, 
   3.681143816909189*^9}, {3.681143883115938*^9, 3.681143910245565*^9}, {
   3.681143975759418*^9, 3.6811439860132523`*^9}, {3.681144084527836*^9, 
   3.681144108026678*^9}, {3.681144216093721*^9, 3.681144305266738*^9}, {
   3.681144381730763*^9, 3.681144402157851*^9}, 3.681144482476859*^9, 
   3.681144723593614*^9, {3.681144797454055*^9, 3.681144974902609*^9}, {
   3.681145538884254*^9, 3.681145582136866*^9}, {3.681145630469822*^9, 
   3.681145655242414*^9}, {3.681145685336232*^9, 3.6811457582647133`*^9}, {
   3.681145891713855*^9, 3.681145894917603*^9}, {3.681145989852735*^9, 
   3.6811459925234623`*^9}, {3.681146082194442*^9, 3.681146084474386*^9}, {
   3.681146225332096*^9, 3.6811462277315683`*^9}, {3.681146317642667*^9, 
   3.681146352498068*^9}, {3.681146412349124*^9, 3.681146472595998*^9}, {
   3.681146558385929*^9, 3.681146560817416*^9}, {3.681146893216846*^9, 
   3.681146895841*^9}, {3.681147057101383*^9, 3.68114710639242*^9}, {
   3.681147346561636*^9, 3.68114735135569*^9}, {3.681147401468254*^9, 
   3.6811474607485943`*^9}, 3.681147522196763*^9, {3.681147739747787*^9, 
   3.6811477623270473`*^9}, {3.681147793070963*^9, 3.681147797797327*^9}, {
   3.68114785137181*^9, 3.681147856542211*^9}, {3.681147956564603*^9, 
   3.681147958996069*^9}, {3.681148117758882*^9, 3.681148120135434*^9}, 
   3.681148168404652*^9, {3.681148258607171*^9, 3.681148277150629*^9}, {
   3.68114831119247*^9, 3.68114831618908*^9}, {3.681148530581483*^9, 
   3.681148599862707*^9}, {3.681148657926941*^9, 3.681148712198728*^9}, {
   3.6811487427815657`*^9, 3.6811488544572773`*^9}, {3.6811489239323063`*^9, 
   3.68114893182622*^9}, {3.681149030688048*^9, 3.6811490502754383`*^9}, {
   3.681149097442711*^9, 3.681149104463245*^9}, {3.68114913632325*^9, 
   3.681149167642371*^9}, {3.6811492041140757`*^9, 3.681149229910213*^9}, {
   3.681149599382193*^9, 3.681149719053691*^9}, {3.681149770357382*^9, 
   3.681149928689267*^9}, {3.681149970975169*^9, 3.681150142406597*^9}, {
   3.681150203750476*^9, 3.681150232869417*^9}, {3.6811502666790667`*^9, 
   3.6811503832267113`*^9}, {3.6811504268229628`*^9, 3.681150537955812*^9}, {
   3.681150772988089*^9, 3.68115082218536*^9}, {3.6811508897175694`*^9, 
   3.681150981423316*^9}, {3.6811510457783337`*^9, 3.681151046946452*^9}, {
   3.681151171986701*^9, 3.681151200017424*^9}, {3.681151474375023*^9, 
   3.681151504108967*^9}, {3.6811515496312313`*^9, 3.681151693289844*^9}, {
   3.68115219441376*^9, 3.681152238542252*^9}, {3.6811522708292437`*^9, 
   3.681152307037229*^9}, {3.681152351603984*^9, 3.68115247090504*^9}, 
   3.681152701618003*^9, 3.68115290992269*^9, {3.681152941925377*^9, 
   3.681152991963181*^9}, {3.681153022005909*^9, 3.681153056327114*^9}, {
   3.6811617406059217`*^9, 3.6811618245510283`*^9}, {3.6811618583925037`*^9, 
   3.681161881947967*^9}, {3.6811619146411943`*^9, 3.681161928935604*^9}, {
   3.681162017396137*^9, 3.681162057573429*^9}, {3.6811621046417913`*^9, 
   3.681162142964425*^9}, {3.6811621960934258`*^9, 3.681162299963286*^9}, {
   3.681162358220017*^9, 3.681162412729548*^9}, {3.6811643682439823`*^9, 
   3.68116444276239*^9}, {3.681164556714806*^9, 3.681164601373633*^9}, {
   3.681164723111594*^9, 3.6811647298265657`*^9}, {3.681164775391477*^9, 
   3.6811647834517813`*^9}, {3.6811648679935703`*^9, 
   3.6811649052364197`*^9}, {3.681165131581167*^9, 3.681165138870425*^9}, 
   3.681165276523944*^9, {3.681169173017664*^9, 3.681169174311305*^9}, {
   3.681169407657935*^9, 3.6811695334045277`*^9}, {3.681169654032877*^9, 
   3.6811697029779043`*^9}, {3.681169738644771*^9, 3.681169776027862*^9}, {
   3.681169841047707*^9, 3.681169849682024*^9}, {3.681170172886101*^9, 
   3.681170176738043*^9}, {3.68117031223575*^9, 3.681170353121282*^9}, {
   3.681170910631763*^9, 3.681170955197617*^9}, {3.681171029694336*^9, 
   3.6811711916821136`*^9}, {3.6811715149992*^9, 3.681171557670632*^9}, {
   3.681171593042083*^9, 3.681171662632987*^9}, {3.6811719016480913`*^9, 
   3.681171960341846*^9}, {3.681172138727128*^9, 3.681172145313972*^9}, {
   3.681180318366177*^9, 3.681180632750218*^9}, {3.6811807638986883`*^9, 
   3.681180802551042*^9}, {3.681180863411635*^9, 3.681180890519033*^9}, {
   3.681181183997016*^9, 3.681181204431755*^9}, 3.681182064657395*^9, {
   3.681182328558342*^9, 3.681182335039892*^9}, {3.681182820227943*^9, 
   3.68118282130898*^9}, {3.6812291969161167`*^9, 3.681229220239325*^9}, {
   3.681229282389657*^9, 3.681229282994191*^9}, {3.683565419646818*^9, 
   3.683565425496804*^9}, {3.683565458791307*^9, 3.683565468269518*^9}, 
   3.683892233752467*^9, {3.6838922662427073`*^9, 3.683892311218069*^9}, {
   3.6838930180970297`*^9, 3.683893043863544*^9}, 3.683893280076545*^9, {
   3.6838933390722313`*^9, 3.683893342333606*^9}, 3.683893431926052*^9, {
   3.683894213454645*^9, 3.683894225332776*^9}, {3.6838942711853*^9, 
   3.683894329800722*^9}, {3.683894360514092*^9, 3.683894425924917*^9}, 
   3.6838975587077007`*^9, {3.683897823689829*^9, 3.683897843241229*^9}, {
   3.6839012539801073`*^9, 3.68390134568299*^9}, {3.6839014415385227`*^9, 
   3.683901486670298*^9}, {3.6839015682977552`*^9, 3.683901628892839*^9}, {
   3.683901688945384*^9, 3.6839017791501093`*^9}, {3.683901813261648*^9, 
   3.683901850408699*^9}, {3.683901881573168*^9, 3.6839019630489273`*^9}, {
   3.683902101434054*^9, 3.683902126934218*^9}, 3.683902237749786*^9, {
   3.683902276282715*^9, 3.683902276830513*^9}, {3.6839023278623857`*^9, 
   3.683902375604822*^9}, {3.683902406623643*^9, 3.6839024431460857`*^9}, {
   3.6839028365169163`*^9, 3.683902956877437*^9}, 3.683903073987175*^9, {
   3.6839031055350313`*^9, 3.6839032876217422`*^9}, {3.683903318792428*^9, 
   3.683903367952126*^9}, {3.683903420311298*^9, 3.683903577339014*^9}, {
   3.6839036386326723`*^9, 3.683903808441792*^9}, {3.683903942763453*^9, 
   3.683903985153413*^9}, {3.6839040747188263`*^9, 3.683904114546836*^9}, {
   3.683904314929718*^9, 3.68390447921596*^9}, {3.683904514163961*^9, 
   3.683904591344945*^9}, {3.683904672807591*^9, 3.683904708331335*^9}, {
   3.6839047435916986`*^9, 3.683904770280657*^9}, {3.6839048063765173`*^9, 
   3.683904846967449*^9}, {3.68390497634664*^9, 3.683905064838929*^9}, {
   3.683905262737903*^9, 3.683905343735585*^9}, {3.683905436193942*^9, 
   3.683905461121059*^9}, {3.683905503322003*^9, 3.683905546336514*^9}, {
   3.6839060610369053`*^9, 3.68390606128048*^9}, {3.6839061712425013`*^9, 
   3.6839062645906353`*^9}, {3.6839063066063023`*^9, 3.683906317795884*^9}, {
   3.6839072415267563`*^9, 3.683907292177362*^9}, {3.683991339977468*^9, 
   3.683991450673688*^9}, {3.683991533465312*^9, 3.68399154305653*^9}, {
   3.683991605628922*^9, 3.683991654556541*^9}, {3.683991952539225*^9, 
   3.683991958604719*^9}, {3.683992141151143*^9, 3.683992196401704*^9}, {
   3.683992279376669*^9, 3.6839922888503857`*^9}, {3.683992372102684*^9, 
   3.68399257589279*^9}, 3.683992680660678*^9, {3.68399274740197*^9, 
   3.683992751736013*^9}, {3.6839930277973127`*^9, 3.683993028245635*^9}, {
   3.683993098691717*^9, 3.68399312324222*^9}, {3.683993389691242*^9, 
   3.683993402014574*^9}, {3.692619464456427*^9, 3.6926196400401583`*^9}, {
   3.692619759463627*^9, 3.69261977346439*^9}, {3.692619877972939*^9, 
   3.692619935403736*^9}, {3.692620028565526*^9, 3.692620033455007*^9}, {
   3.692620233550186*^9, 3.692620233811203*^9}, {3.692620865759804*^9, 
   3.692620865902776*^9}, {3.69262101799091*^9, 3.6926210180923977`*^9}, {
   3.6926211787111473`*^9, 3.692621179817383*^9}, {3.692621288701289*^9, 
   3.692621289056712*^9}, {3.692621405782123*^9, 3.6926214060256243`*^9}, {
   3.692621526117157*^9, 3.6926215268624887`*^9}, {3.6926216346985188`*^9, 
   3.692621634886984*^9}, {3.692621665303541*^9, 3.692621665419945*^9}, {
   3.692621858899351*^9, 3.692621859077977*^9}, 3.692622057210783*^9, {
   3.692622282185726*^9, 3.6926222823289127`*^9}, {3.6926228641130533`*^9, 
   3.692622864219365*^9}, {3.69262295966648*^9, 3.692622959786669*^9}, {
   3.6926230710685863`*^9, 3.6926230719984303`*^9}, {3.692623174940878*^9, 
   3.692623175700794*^9}, {3.6926232593529177`*^9, 3.6926232598227367`*^9}, {
   3.692623330093791*^9, 3.692623330209894*^9}, {3.69262341514095*^9, 
   3.6926234152618732`*^9}, {3.6926235012809267`*^9, 3.692623503596023*^9}, {
   3.6926235830416327`*^9, 3.6926235831364202`*^9}, {3.692623656442459*^9, 
   3.692623656845418*^9}, {3.692623729135895*^9, 3.6926237297020893`*^9}, {
   3.692623838419091*^9, 3.692623838822535*^9}, {3.692623915647265*^9, 
   3.692623918816534*^9}, {3.692638935570221*^9, 3.692638939624324*^9}, {
   3.692640763806162*^9, 3.6926407674438467`*^9}, {3.692640894300507*^9, 
   3.69264089461125*^9}, {3.693091654829733*^9, 3.693091721793475*^9}, {
   3.693091755128813*^9, 3.693091772942811*^9}, {3.6930918379214582`*^9, 
   3.693091872451353*^9}, {3.693091911008156*^9, 3.6930919640895357`*^9}, {
   3.693092152240547*^9, 3.693092217052526*^9}, {3.69309237808772*^9, 
   3.69309239710256*^9}, {3.6930927009133043`*^9, 3.693092702894843*^9}, {
   3.693092923952589*^9, 3.693092926993292*^9}, {3.6930934014394493`*^9, 
   3.693093420469225*^9}, {3.6930945135440187`*^9, 3.693094514161789*^9}, {
   3.694184104810199*^9, 3.694184116828127*^9}, 3.694261082011174*^9, {
   3.6942612220834913`*^9, 3.694261224344653*^9}, 3.694261357526672*^9, 
   3.69426236934452*^9, {3.694262513808316*^9, 3.6942625238201036`*^9}, {
   3.694262582158804*^9, 3.69426259785588*^9}, 3.69426273964891*^9, 
   3.6942628766937532`*^9, 3.6942631513863573`*^9, {3.694263559851947*^9, 
   3.694263562940611*^9}, 3.694263760836919*^9, 3.726766204264524*^9, {
   3.726766293363641*^9, 3.7267662965436563`*^9}, {3.726766765765378*^9, 
   3.726766788113408*^9}, {3.7584208012538013`*^9, 3.758420836626297*^9}, 
   3.75842087301112*^9, {3.758420936527996*^9, 3.7584209418393173`*^9}, 
   3.758457732790756*^9, {3.758457764183873*^9, 3.758457764486145*^9}, {
   3.7638354010365763`*^9, 3.763835462954199*^9}, {3.7638354957802277`*^9, 
   3.763835576471655*^9}, {3.763835648205597*^9, 3.7638356647204237`*^9}, {
   3.763840362321856*^9, 3.7638404333467417`*^9}, {3.7638404657716837`*^9, 
   3.763840470300585*^9}, {3.7638405295570107`*^9, 3.7638405713772907`*^9}, {
   3.763842645711047*^9, 3.763842654137068*^9}, {3.763892277232108*^9, 
   3.763892329585437*^9}, {3.7639249324046288`*^9, 3.763924932958201*^9}, {
   3.763925028013762*^9, 3.763925030793487*^9}, 3.7639253730975533`*^9, {
   3.7639255985275793`*^9, 3.7639255986425877`*^9}, {3.763934837652206*^9, 
   3.76393483844165*^9}, {3.76393494394208*^9, 3.763934946365551*^9}, {
   3.763935000491516*^9, 3.7639350046769037`*^9}, {3.763935050368672*^9, 
   3.763935058537633*^9}, {3.7639351061951847`*^9, 3.763935108800825*^9}, 
   3.763935185246451*^9, {3.7639352487943583`*^9, 3.763935260429077*^9}, {
   3.763935676332651*^9, 3.7639357042692413`*^9}, {3.7639359427352867`*^9, 
   3.7639359479254017`*^9}, {3.7639360929726686`*^9, 3.763936115056493*^9}, {
   3.763942100838717*^9, 3.763942205994113*^9}, {3.763942248734939*^9, 
   3.763942262509432*^9}},ExpressionUUID->"81547e81-a673-482f-b72a-\
7a144e755e92"],

Cell[BoxData[
 InterpretationBox[Cell[
  "STEP 1: Set working directory", "Subsection",ExpressionUUID->
   "21d5cef6-9683-4a52-8b49-77a7740bfc0a"],
  TextCell["STEP 1: Set working directory", "Subsection"]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942210661643*^9},
 CellLabel->"Out[1]=",ExpressionUUID->"216300f1-daf6-476b-a4ab-f6e6d2152317"],

Cell[BoxData[
 InterpretationBox[Cell[
  "Set working directory", "Subsection",ExpressionUUID->
   "1b969a90-1c63-42d5-bb4c-7c12b4732f36"],
  TextCell["Set working directory", "Subsection"]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942210678446*^9},
 CellLabel->"Out[2]=",ExpressionUUID->"6a1c52c3-9ec8-472c-ad3d-84499c245bf7"],

Cell[BoxData[
 TemplateBox[{
  "SetDirectory","cdir",
   "\"Cannot set current directory to \
\\!\\(\\*RowBox[{\\\"\\\\\\\"/Users/mmting/.../DP_Replication\\\\\\\"\\\"}]\\)\
.\"",2,3,1,23692548541274258860,"Local"},
  "MessageTemplate"]], "Message", "MSG",
 CellChangeTimes->{3.7639422108356447`*^9},
 CellLabel->
  "During evaluation of \
In[1]:=",ExpressionUUID->"e179cf7b-59ff-4e1d-9434-d266686faaf2"],

Cell[BoxData["$Failed"], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942210847005*^9},
 CellLabel->"Out[3]=",ExpressionUUID->"19eb7790-2cc3-4f0f-a54b-15b9716df9d6"],

Cell[BoxData[
 InterpretationBox[Cell[
  "Define one period best-response functions", "Subsection",ExpressionUUID->
   "d32250c4-563b-43cb-9702-025343b00f07"],
  TextCell[
  "Define one period best-response functions", "Subsection"]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942210858355*^9},
 CellLabel->"Out[5]=",ExpressionUUID->"f118e46d-114f-4527-8db8-e36a8c51ecc6"],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"Throughout, make the following parametric assumptions: \[Rho] \
= \"\>", "\[InvisibleSpace]", 
   FractionBox["1", "2"]}],
  SequenceForm[
  "Throughout, make the following parametric assumptions: \[Rho] = ", 
   Rational[1, 2]],
  Editable->False]], "Print",
 CellChangeTimes->{
  3.763840553171976*^9, {3.7638426406136923`*^9, 3.7638426547936583`*^9}, 
   3.763923508664912*^9, 3.7639243271718807`*^9, 3.763934847713293*^9, 
   3.76393494923569*^9, 3.763935009163783*^9, 3.763935065833124*^9, 
   3.76393511399654*^9, 3.76393526166133*^9, 3.763935561078165*^9, 
   3.763942210870447*^9},
 CellLabel->
  "During evaluation of \
In[1]:=",ExpressionUUID->"0cea7d7e-713b-4222-8cf9-d0591892af19"],

Cell[BoxData[
 InterpretationBox[Cell["\<\
Case 1  No primaries; each party maximizes utility of elite faction\
\>", "Subsubsection",ExpressionUUID->"b7344077-05b3-44c5-a84d-da2260a417a7"],
  TextCell[
  "Case 1  No primaries; each party maximizes utility of elite faction", 
   "Subsubsection"]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942210882756*^9},
 CellLabel->"Out[12]=",ExpressionUUID->"73834a88-482c-42a7-b2eb-20629adb69b4"],

Cell[BoxData[
 InterpretationBox[Cell[
  "R (elite) objective", "Text",ExpressionUUID->
   "5de106b1-a32b-4d44-91fd-aa0f64edf5fa"],
  TextCell["R (elite) objective", "Text"]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942210894662*^9},
 CellLabel->"Out[13]=",ExpressionUUID->"2783d2c2-79e1-4c76-94b2-e85abce1f634"],

Cell[BoxData[
 FractionBox[
  RowBox[{
   SuperscriptBox["ql", "2"], "+", 
   RowBox[{"2", " ", "v", " ", "xm"}], "+", 
   RowBox[{
    SuperscriptBox["qr", "2"], " ", 
    RowBox[{"(", 
     RowBox[{"1", "-", 
      RowBox[{"2", " ", "\[Alpha]"}]}], ")"}]}], "+", 
   RowBox[{"v", " ", "\[Alpha]"}], "+", 
   RowBox[{"2", " ", "xm", " ", "\[CapitalDelta]"}], "-", 
   RowBox[{"\[Alpha]", " ", "\[CapitalDelta]"}], "-", 
   RowBox[{"ql", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"2", " ", "qr"}], "+", "v", "+", 
      RowBox[{"2", " ", "xm"}], "-", "\[Alpha]", "+", "\[CapitalDelta]"}], 
     ")"}]}], "+", 
   RowBox[{"qr", " ", 
    RowBox[{"(", 
     RowBox[{"v", "+", 
      RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "+", "\[CapitalDelta]"}], 
     ")"}]}]}], 
  RowBox[{"2", " ", "\[Alpha]"}]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942210906514*^9},
 CellLabel->"Out[15]=",ExpressionUUID->"9dc84594-cc1b-48b0-a0f5-8b1bd51b5d45"],

Cell[BoxData[
 InterpretationBox[Cell[
  "R (non-elite) objective", "Text",ExpressionUUID->
   "5492b3f2-c2e4-4bdf-9cfe-357ea24aa3c4"],
  TextCell["R (non-elite) objective", "Text"]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942210917877*^9},
 CellLabel->"Out[16]=",ExpressionUUID->"cb569322-c63a-4ffe-97b7-b82b747ea850"],

Cell[BoxData[
 FractionBox[
  RowBox[{
   SuperscriptBox["ql", "2"], "+", 
   RowBox[{
    SuperscriptBox["qr", "2"], " ", 
    RowBox[{"(", 
     RowBox[{"1", "-", 
      RowBox[{"2", " ", "\[Alpha]"}]}], ")"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{
      RowBox[{"2", " ", "xm"}], "-", "\[Alpha]"}], ")"}], " ", 
    "\[CapitalDelta]"}], "-", 
   RowBox[{"ql", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"2", " ", "qr"}], "+", 
      RowBox[{"2", " ", "xm"}], "-", "\[Alpha]", "+", "\[CapitalDelta]"}], 
     ")"}]}], "+", 
   RowBox[{"qr", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "+", "\[CapitalDelta]"}], 
     ")"}]}]}], 
  RowBox[{"2", " ", "\[Alpha]"}]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.76394221093004*^9},
 CellLabel->"Out[18]=",ExpressionUUID->"47d67999-abfa-4970-ae03-a0d7cd474b14"],

Cell[BoxData[
 InterpretationBox[Cell[
  "L (elite) objective", "Text",ExpressionUUID->
   "a3e2fcb5-7ffd-4cb6-ac47-6f0cabc6049e"],
  TextCell["L (elite) objective", "Text"]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942210942175*^9},
 CellLabel->"Out[19]=",ExpressionUUID->"2110b939-0ada-4179-9789-6efc50200ee9"],

Cell[BoxData[
 FractionBox[
  RowBox[{
   SuperscriptBox["qr", "2"], "-", 
   RowBox[{"2", " ", "v", " ", "xm"}], "+", 
   RowBox[{
    SuperscriptBox["ql", "2"], " ", 
    RowBox[{"(", 
     RowBox[{"1", "-", 
      RowBox[{"2", " ", "\[Alpha]"}]}], ")"}]}], "+", 
   RowBox[{"v", " ", "\[Alpha]"}], "-", 
   RowBox[{"2", " ", "xm", " ", "\[CapitalDelta]"}], "-", 
   RowBox[{"\[Alpha]", " ", "\[CapitalDelta]"}], "-", 
   RowBox[{"qr", " ", 
    RowBox[{"(", 
     RowBox[{"v", "-", 
      RowBox[{"2", " ", "xm"}], "-", "\[Alpha]", "+", "\[CapitalDelta]"}], 
     ")"}]}], "+", 
   RowBox[{"ql", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"-", "2"}], " ", "qr"}], "+", "v", "-", 
      RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "+", "\[CapitalDelta]"}], 
     ")"}]}]}], 
  RowBox[{"2", " ", "\[Alpha]"}]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942210953601*^9},
 CellLabel->"Out[21]=",ExpressionUUID->"889c5c74-b1cd-4e5e-a23d-32e0a29ca8af"],

Cell[BoxData[
 InterpretationBox[Cell[
  "L (non-elite) objective", "Text",ExpressionUUID->
   "06eeea39-620d-4dfa-9c57-f37c75f67005"],
  TextCell["L (non-elite) objective", "Text"]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942210965061*^9},
 CellLabel->"Out[22]=",ExpressionUUID->"67c3bd6e-3f3c-4ee9-a525-1b0a6784e2ad"],

Cell[BoxData[
 FractionBox[
  RowBox[{
   RowBox[{
    SuperscriptBox["ql", "2"], " ", 
    RowBox[{"(", 
     RowBox[{"1", "-", 
      RowBox[{"2", " ", "\[Alpha]"}]}], ")"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"qr", "+", 
      RowBox[{"2", " ", "xm"}], "+", "\[Alpha]"}], ")"}], " ", 
    RowBox[{"(", 
     RowBox[{"qr", "-", "\[CapitalDelta]"}], ")"}]}], "+", 
   RowBox[{"ql", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"-", "2"}], " ", "qr"}], "-", 
      RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "+", "\[CapitalDelta]"}], 
     ")"}]}]}], 
  RowBox[{"2", " ", "\[Alpha]"}]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942210976502*^9},
 CellLabel->"Out[24]=",ExpressionUUID->"29052c2f-ddcc-4c35-a37c-71b9045c519c"],

Cell[BoxData[
 InterpretationBox[Cell[
  "Period 2 policies", "Text",ExpressionUUID->
   "9fcb3a22-2527-4fd6-ba09-73bb7fa192c3"],
  TextCell["Period 2 policies", "Text"]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942210988414*^9},
 CellLabel->"Out[25]=",ExpressionUUID->"c9fe2f9a-dcb1-4448-bcd9-bf1db0a87ee7"],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"R, L FOCs: \"\>", "\[InvisibleSpace]", 
   FractionBox[
    RowBox[{
     RowBox[{
      RowBox[{"-", "2"}], " ", "ql"}], "+", "v", "+", 
     RowBox[{"2", " ", "xm"}], "+", 
     RowBox[{"qr", " ", 
      RowBox[{"(", 
       RowBox[{"2", "-", 
        RowBox[{"4", " ", "\[Alpha]"}]}], ")"}]}], "+", "\[Alpha]", "+", 
     "\[CapitalDelta]"}], 
    RowBox[{"2", " ", "\[Alpha]"}]], "\[InvisibleSpace]", "\<\", \"\>", 
   "\[InvisibleSpace]", 
   FractionBox[
    RowBox[{
     RowBox[{"2", " ", "ql"}], "-", 
     RowBox[{"2", " ", "qr"}], "+", "v", "-", 
     RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "-", 
     RowBox[{"4", " ", "ql", " ", "\[Alpha]"}], "+", "\[CapitalDelta]"}], 
    RowBox[{"2", " ", "\[Alpha]"}]]}],
  SequenceForm[
  "R, L FOCs: ", 
   Rational[1, 
     2] $CellContext`\[Alpha]^(-1) ((-2) $CellContext`ql + $CellContext`v + 
    2 $CellContext`xm + $CellContext`qr (2 - 
      4 $CellContext`\[Alpha]) + $CellContext`\[Alpha] + $CellContext`\
\[CapitalDelta]), ", ", 
   Rational[1, 2] $CellContext`\[Alpha]^(-1) (2 $CellContext`ql - 
    2 $CellContext`qr + $CellContext`v - 
    2 $CellContext`xm + $CellContext`\[Alpha] - 
    4 $CellContext`ql $CellContext`\[Alpha] + $CellContext`\[CapitalDelta])],
  Editable->False]], "Print",
 CellChangeTimes->{
  3.763840553171976*^9, {3.7638426406136923`*^9, 3.7638426547936583`*^9}, 
   3.763923508664912*^9, 3.7639243271718807`*^9, 3.763934847713293*^9, 
   3.76393494923569*^9, 3.763935009163783*^9, 3.763935065833124*^9, 
   3.76393511399654*^9, 3.76393526166133*^9, 3.763935561078165*^9, 
   3.763942211000607*^9},
 CellLabel->
  "During evaluation of \
In[1]:=",ExpressionUUID->"53f4a2a6-0f21-42ac-856b-afe6321443b1"],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"R, L SOCs: \"\>", "\[InvisibleSpace]", 
   RowBox[{
    RowBox[{"-", "2"}], "+", 
    FractionBox["1", "\[Alpha]"]}], "\[InvisibleSpace]", "\<\", \"\>", 
   "\[InvisibleSpace]", 
   RowBox[{
    RowBox[{"-", "2"}], "+", 
    FractionBox["1", "\[Alpha]"]}]}],
  SequenceForm[
  "R, L SOCs: ", -2 + $CellContext`\[Alpha]^(-1), 
   ", ", -2 + $CellContext`\[Alpha]^(-1)],
  Editable->False]], "Print",
 CellChangeTimes->{
  3.763840553171976*^9, {3.7638426406136923`*^9, 3.7638426547936583`*^9}, 
   3.763923508664912*^9, 3.7639243271718807`*^9, 3.763934847713293*^9, 
   3.76393494923569*^9, 3.763935009163783*^9, 3.763935065833124*^9, 
   3.76393511399654*^9, 3.76393526166133*^9, 3.763935561078165*^9, 
   3.7639422110100107`*^9},
 CellLabel->
  "During evaluation of \
In[1]:=",ExpressionUUID->"1e3baf44-d866-4a95-94b5-0d6bbf12a872"],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"R, L FOC solutions: \"\>", "\[InvisibleSpace]", 
   RowBox[{"{", 
    RowBox[{"{", 
     RowBox[{"qr", "\[Rule]", 
      FractionBox[
       RowBox[{
        RowBox[{
         RowBox[{"-", "2"}], " ", "ql"}], "+", "v", "+", 
        RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "+", "\[CapitalDelta]"}], 
       RowBox[{
        RowBox[{"-", "2"}], "+", 
        RowBox[{"4", " ", "\[Alpha]"}]}]]}], "}"}], "}"}], 
   "\[InvisibleSpace]", "\<\", \"\>", "\[InvisibleSpace]", 
   RowBox[{"{", 
    RowBox[{"{", 
     RowBox[{"ql", "\[Rule]", 
      FractionBox[
       RowBox[{
        RowBox[{
         RowBox[{"-", "2"}], " ", "qr"}], "+", "v", "-", 
        RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "+", "\[CapitalDelta]"}], 
       RowBox[{
        RowBox[{"-", "2"}], "+", 
        RowBox[{"4", " ", "\[Alpha]"}]}]]}], "}"}], "}"}]}],
  SequenceForm[
  "R, L FOC solutions: ", {{$CellContext`qr -> (-2 + 
        4 $CellContext`\[Alpha])^(-1) ((-2) $CellContext`ql + $CellContext`v + 
       2 $CellContext`xm + $CellContext`\[Alpha] + $CellContext`\
\[CapitalDelta])}}, 
   ", ", {{$CellContext`ql -> (-2 + 
        4 $CellContext`\[Alpha])^(-1) ((-2) $CellContext`qr + $CellContext`v - 
       2 $CellContext`xm + $CellContext`\[Alpha] + $CellContext`\
\[CapitalDelta])}}],
  Editable->False]], "Print",
 CellChangeTimes->{
  3.763840553171976*^9, {3.7638426406136923`*^9, 3.7638426547936583`*^9}, 
   3.763923508664912*^9, 3.7639243271718807`*^9, 3.763934847713293*^9, 
   3.76393494923569*^9, 3.763935009163783*^9, 3.763935065833124*^9, 
   3.76393511399654*^9, 3.76393526166133*^9, 3.763935561078165*^9, 
   3.763942211026232*^9},
 CellLabel->
  "During evaluation of \
In[1]:=",ExpressionUUID->"473f66a1-c93d-4433-bd15-b1095f37edd0"]
}, Open  ]],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"ql", "\[Rule]", 
     FractionBox[
      RowBox[{"v", "+", "\[Alpha]", "-", 
       RowBox[{"v", " ", "\[Alpha]"}], "+", 
       RowBox[{"2", " ", "xm", " ", "\[Alpha]"}], "-", 
       SuperscriptBox["\[Alpha]", "2"], "+", "\[CapitalDelta]", "-", 
       RowBox[{"\[Alpha]", " ", "\[CapitalDelta]"}]}], 
      RowBox[{
       RowBox[{"4", " ", "\[Alpha]"}], "-", 
       RowBox[{"4", " ", 
        SuperscriptBox["\[Alpha]", "2"]}]}]]}], ",", 
    RowBox[{"qr", "\[Rule]", 
     FractionBox[
      RowBox[{
       RowBox[{"v", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}]}], "+", 
       SuperscriptBox["\[Alpha]", "2"], "-", "\[CapitalDelta]", "+", 
       RowBox[{"\[Alpha]", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "1"}], "+", 
          RowBox[{"2", " ", "xm"}], "+", "\[CapitalDelta]"}], ")"}]}]}], 
      RowBox[{"4", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], " ", "\[Alpha]"}]]}]}],
    "}"}], "}"}]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.7639422110348473`*^9},
 CellLabel->"Out[29]=",ExpressionUUID->"ab7fd995-7ad1-44ff-aefc-d8189ad2dc87"],

Cell[BoxData[
 InterpretationBox[Cell[
  "Case 2  Primaries for party R only", "Subsubsection",ExpressionUUID->
   "73c68650-3774-4d2f-ab53-22f62e973a3a"],
  TextCell["Case 2  Primaries for party R only", "Subsubsection"]]], "Output",\

 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211048306*^9},
 CellLabel->"Out[31]=",ExpressionUUID->"9b5762d0-86d7-45ce-93dd-feca411c8ba3"],

Cell[BoxData[
 InterpretationBox[Cell[
  "R elite objective under primaries", "Text",ExpressionUUID->
   "4f5d85e0-4363-45bf-ba7b-b85cc1212e62"],
  TextCell["R elite objective under primaries", "Text"]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211057577*^9},
 CellLabel->"Out[32]=",ExpressionUUID->"2ca9d71a-cdcd-422f-8d17-fc6332c71719"],

Cell[BoxData[
 RowBox[{
  FractionBox["1", 
   RowBox[{"8", " ", "\[Alpha]"}]], 
  RowBox[{"(", 
   RowBox[{
    RowBox[{"b", " ", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{
        RowBox[{"-", "2"}], " ", "ql"}], "+", "qre", "+", "qrn", "+", "v", 
       "+", 
       RowBox[{"2", " ", "\[CapitalDelta]"}]}], ")"}]}], "+", 
    RowBox[{"2", " ", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{"2", " ", 
        SuperscriptBox["ql", "2"]}], "+", 
       SuperscriptBox["qrn", "2"], "+", 
       RowBox[{"2", " ", "qrn", " ", "xm"}], "+", 
       RowBox[{"2", " ", "v", " ", "xm"}], "+", 
       RowBox[{
        SuperscriptBox["qre", "2"], " ", 
        RowBox[{"(", 
         RowBox[{"1", "-", 
          RowBox[{"2", " ", "\[Alpha]"}]}], ")"}]}], "+", 
       RowBox[{"qrn", " ", "\[Alpha]"}], "-", 
       RowBox[{"2", " ", 
        SuperscriptBox["qrn", "2"], " ", "\[Alpha]"}], "+", 
       RowBox[{"v", " ", "\[Alpha]"}], "+", 
       RowBox[{"qrn", " ", "\[CapitalDelta]"}], "+", 
       RowBox[{"4", " ", "xm", " ", "\[CapitalDelta]"}], "-", 
       RowBox[{"2", " ", "\[Alpha]", " ", "\[CapitalDelta]"}], "+", 
       RowBox[{"qre", " ", 
        RowBox[{"(", 
         RowBox[{"v", "+", 
          RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "+", "\[CapitalDelta]"}],
          ")"}]}], "-", 
       RowBox[{"ql", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"2", " ", "qre"}], "+", 
          RowBox[{"2", " ", "qrn"}], "+", "v", "+", 
          RowBox[{"4", " ", "xm"}], "-", 
          RowBox[{"2", " ", "\[Alpha]"}], "+", 
          RowBox[{"2", " ", "\[CapitalDelta]"}]}], ")"}]}]}], ")"}]}]}], 
   ")"}]}]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.7639422110679092`*^9},
 CellLabel->"Out[34]=",ExpressionUUID->"91bae4d7-830c-41b1-ae65-dc70aa897b99"],

Cell[BoxData[
 InterpretationBox[Cell[
  "R non-elite objective under primaries", "Text",ExpressionUUID->
   "9b70c2d9-96c7-49c9-b121-b81f718019ce"],
  TextCell["R non-elite objective under primaries", "Text"]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211077124*^9},
 CellLabel->"Out[35]=",ExpressionUUID->"24eed8fa-624e-4325-97a4-f9d55d44833e"],

Cell[BoxData[
 RowBox[{
  FractionBox["1", 
   RowBox[{"8", " ", "\[Alpha]"}]], 
  RowBox[{"(", 
   RowBox[{
    RowBox[{"b", " ", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{
        RowBox[{"-", "2"}], " ", "ql"}], "+", "qre", "+", "qrn", "+", "v", 
       "+", 
       RowBox[{"2", " ", "\[CapitalDelta]"}]}], ")"}]}], "+", 
    RowBox[{"2", " ", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{"2", " ", 
        SuperscriptBox["ql", "2"]}], "+", 
       SuperscriptBox["qrn", "2"], "+", 
       RowBox[{"qrn", " ", "v"}], "+", 
       RowBox[{"2", " ", "qrn", " ", "xm"}], "+", 
       RowBox[{"2", " ", "v", " ", "xm"}], "+", 
       RowBox[{
        SuperscriptBox["qre", "2"], " ", 
        RowBox[{"(", 
         RowBox[{"1", "-", 
          RowBox[{"2", " ", "\[Alpha]"}]}], ")"}]}], "+", 
       RowBox[{"qrn", " ", "\[Alpha]"}], "-", 
       RowBox[{"2", " ", 
        SuperscriptBox["qrn", "2"], " ", "\[Alpha]"}], "+", 
       RowBox[{"v", " ", "\[Alpha]"}], "+", 
       RowBox[{"qrn", " ", "\[CapitalDelta]"}], "+", 
       RowBox[{"4", " ", "xm", " ", "\[CapitalDelta]"}], "-", 
       RowBox[{"2", " ", "\[Alpha]", " ", "\[CapitalDelta]"}], "+", 
       RowBox[{"qre", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "+", "\[CapitalDelta]"}],
          ")"}]}], "-", 
       RowBox[{"ql", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"2", " ", "qre"}], "+", 
          RowBox[{"2", " ", "qrn"}], "+", "v", "+", 
          RowBox[{"4", " ", "xm"}], "-", 
          RowBox[{"2", " ", "\[Alpha]"}], "+", 
          RowBox[{"2", " ", "\[CapitalDelta]"}]}], ")"}]}]}], ")"}]}]}], 
   ")"}]}]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211087038*^9},
 CellLabel->"Out[37]=",ExpressionUUID->"dfd592f4-6882-4a17-8752-bb59b67d9390"],

Cell[BoxData[
 InterpretationBox[Cell[
  "L (elite) objective when facing R with primaries", "Text",ExpressionUUID->
   "d3c7c0b3-2891-4f28-9cee-183839d64505"],
  TextCell[
  "L (elite) objective when facing R with primaries", "Text"]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211096088*^9},
 CellLabel->"Out[38]=",ExpressionUUID->"58ce69aa-3866-4ee6-9281-88b7e851bb8b"],

Cell[BoxData[
 RowBox[{
  FractionBox["1", 
   RowBox[{"8", " ", "\[Alpha]"}]], 
  RowBox[{"(", 
   RowBox[{
    RowBox[{"b", " ", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{
        RowBox[{"-", "2"}], " ", "ql"}], "+", "qre", "+", "qrn", "-", 
       RowBox[{"2", " ", "v"}], "-", 
       RowBox[{"2", " ", "\[CapitalDelta]"}]}], ")"}]}], "-", 
    RowBox[{"2", " ", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{"-", 
        SuperscriptBox["qre", "2"]}], "-", 
       SuperscriptBox["qrn", "2"], "+", 
       RowBox[{"qrn", " ", "v"}], "-", 
       RowBox[{"2", " ", "qrn", " ", "xm"}], "+", 
       RowBox[{"4", " ", "v", " ", "xm"}], "-", 
       RowBox[{"qrn", " ", "\[Alpha]"}], "-", 
       RowBox[{"2", " ", "v", " ", "\[Alpha]"}], "+", 
       RowBox[{
        SuperscriptBox["ql", "2"], " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "2"}], "+", 
          RowBox[{"4", " ", "\[Alpha]"}]}], ")"}]}], "+", 
       RowBox[{"2", " ", "ql", " ", 
        RowBox[{"(", 
         RowBox[{"qre", "+", "qrn", "-", "v", "+", 
          RowBox[{"2", " ", "xm"}], "-", "\[Alpha]", "-", "\[CapitalDelta]"}],
          ")"}]}], "+", 
       RowBox[{"qrn", " ", "\[CapitalDelta]"}], "+", 
       RowBox[{"4", " ", "xm", " ", "\[CapitalDelta]"}], "+", 
       RowBox[{"2", " ", "\[Alpha]", " ", "\[CapitalDelta]"}], "+", 
       RowBox[{"qre", " ", 
        RowBox[{"(", 
         RowBox[{"v", "-", 
          RowBox[{"2", " ", "xm"}], "-", "\[Alpha]", "+", "\[CapitalDelta]"}],
          ")"}]}]}], ")"}]}]}], ")"}]}]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211105784*^9},
 CellLabel->"Out[40]=",ExpressionUUID->"26c2f772-e64b-4e7c-8a42-33aa8bf5005d"],

Cell[BoxData[
 InterpretationBox[Cell[
  "L (non-elite) objective when facing R with primaries", "Text",
   ExpressionUUID->"352026cb-688a-4a40-a809-e074f0728cb4"],
  TextCell[
  "L (non-elite) objective when facing R with primaries", "Text"]]], "Output",\

 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.7639422111149673`*^9},
 CellLabel->"Out[41]=",ExpressionUUID->"1bc7af7e-96cf-4d37-a0a8-d5d838c1edda"],

Cell[BoxData[
 FractionBox[
  RowBox[{
   RowBox[{"b", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"-", "2"}], " ", "ql"}], "+", "qre", "+", "qrn", "-", 
      RowBox[{"2", " ", "\[CapitalDelta]"}]}], ")"}]}], "+", 
   RowBox[{"2", " ", 
    RowBox[{"(", 
     RowBox[{
      SuperscriptBox["qre", "2"], "+", 
      SuperscriptBox["qrn", "2"], "+", 
      RowBox[{"2", " ", "qrn", " ", "xm"}], "+", 
      RowBox[{
       SuperscriptBox["ql", "2"], " ", 
       RowBox[{"(", 
        RowBox[{"2", "-", 
         RowBox[{"4", " ", "\[Alpha]"}]}], ")"}]}], "+", 
      RowBox[{"qrn", " ", "\[Alpha]"}], "-", 
      RowBox[{"2", " ", "ql", " ", 
       RowBox[{"(", 
        RowBox[{"qre", "+", "qrn", "+", 
         RowBox[{"2", " ", "xm"}], "-", "\[Alpha]", "-", "\[CapitalDelta]"}], 
        ")"}]}], "+", 
      RowBox[{"qre", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "-", "\[CapitalDelta]"}], 
        ")"}]}], "-", 
      RowBox[{"qrn", " ", "\[CapitalDelta]"}], "-", 
      RowBox[{"4", " ", "xm", " ", "\[CapitalDelta]"}], "-", 
      RowBox[{"2", " ", "\[Alpha]", " ", "\[CapitalDelta]"}]}], ")"}]}]}], 
  RowBox[{"8", " ", "\[Alpha]"}]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211124317*^9},
 CellLabel->"Out[43]=",ExpressionUUID->"0c1145d2-9964-4fef-8526-a37aebf70da7"],

Cell[BoxData[
 InterpretationBox[Cell[
  "Period 2 policies", "Text",ExpressionUUID->
   "b763b542-7658-457b-b54a-2384dcd5d008"],
  TextCell["Period 2 policies", "Text"]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.76394221113087*^9},
 CellLabel->"Out[44]=",ExpressionUUID->"d7bb2c7b-caad-4b38-bdc9-74eb31da2623"],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"RE, RN, L FOCs: \"\>", "\[InvisibleSpace]", 
   FractionBox[
    RowBox[{"b", "+", 
     RowBox[{"2", " ", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{
         RowBox[{"-", "2"}], " ", "ql"}], "+", 
        RowBox[{"2", " ", "qre"}], "+", "v", "+", 
        RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "-", 
        RowBox[{"4", " ", "qre", " ", "\[Alpha]"}], "+", "\[CapitalDelta]"}], 
       ")"}]}]}], 
    RowBox[{"8", " ", "\[Alpha]"}]], "\[InvisibleSpace]", "\<\", \"\>", 
   "\[InvisibleSpace]", 
   FractionBox[
    RowBox[{"b", "+", 
     RowBox[{"2", " ", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{
         RowBox[{"-", "2"}], " ", "ql"}], "+", 
        RowBox[{"2", " ", "qrn"}], "+", "v", "+", 
        RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "-", 
        RowBox[{"4", " ", "qrn", " ", "\[Alpha]"}], "+", "\[CapitalDelta]"}], 
       ")"}]}]}], 
    RowBox[{"8", " ", "\[Alpha]"}]], "\[InvisibleSpace]", "\<\", \"\>", 
   "\[InvisibleSpace]", 
   RowBox[{"-", 
    FractionBox[
     RowBox[{"b", "+", 
      RowBox[{"2", " ", 
       RowBox[{"(", 
        RowBox[{"qre", "+", "qrn", "-", "v", "+", 
         RowBox[{"2", " ", "xm"}], "-", "\[Alpha]", "+", 
         RowBox[{"ql", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "2"}], "+", 
            RowBox[{"4", " ", "\[Alpha]"}]}], ")"}]}], "-", 
         "\[CapitalDelta]"}], ")"}]}]}], 
     RowBox[{"4", " ", "\[Alpha]"}]]}]}],
  SequenceForm[
  "RE, RN, L FOCs: ", 
   Rational[1, 8] $CellContext`\[Alpha]^(-1) ($CellContext`b + 
    2 ((-2) $CellContext`ql + 2 $CellContext`qre + $CellContext`v + 
      2 $CellContext`xm + $CellContext`\[Alpha] - 
      4 $CellContext`qre $CellContext`\[Alpha] + \
$CellContext`\[CapitalDelta])), ", ", 
   Rational[1, 8] $CellContext`\[Alpha]^(-1) ($CellContext`b + 
    2 ((-2) $CellContext`ql + 2 $CellContext`qrn + $CellContext`v + 
      2 $CellContext`xm + $CellContext`\[Alpha] - 
      4 $CellContext`qrn $CellContext`\[Alpha] + \
$CellContext`\[CapitalDelta])), ", ", 
   Rational[-1, 4] $CellContext`\[Alpha]^(-1) ($CellContext`b + 
    2 ($CellContext`qre + $CellContext`qrn - $CellContext`v + 
      2 $CellContext`xm - $CellContext`\[Alpha] + $CellContext`ql (-2 + 
        4 $CellContext`\[Alpha]) - $CellContext`\[CapitalDelta]))],
  Editable->False]], "Print",
 CellChangeTimes->{
  3.763840553171976*^9, {3.7638426406136923`*^9, 3.7638426547936583`*^9}, 
   3.763923508664912*^9, 3.7639243271718807`*^9, 3.763934847713293*^9, 
   3.76393494923569*^9, 3.763935009163783*^9, 3.763935065833124*^9, 
   3.76393511399654*^9, 3.76393526166133*^9, 3.763935561078165*^9, 
   3.7639422111384773`*^9},
 CellLabel->
  "During evaluation of \
In[1]:=",ExpressionUUID->"a10130a4-ec24-4adf-863a-0aac593e76b4"],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"RE, RN, L SOCs: \"\>", "\[InvisibleSpace]", 
   RowBox[{
    RowBox[{"-", "1"}], "+", 
    FractionBox["1", 
     RowBox[{"2", " ", "\[Alpha]"}]]}], "\[InvisibleSpace]", "\<\", \"\>", 
   "\[InvisibleSpace]", 
   RowBox[{
    RowBox[{"-", "1"}], "+", 
    FractionBox["1", 
     RowBox[{"2", " ", "\[Alpha]"}]]}], "\[InvisibleSpace]", "\<\", \"\>", 
   "\[InvisibleSpace]", 
   RowBox[{
    RowBox[{"-", "2"}], "+", 
    FractionBox["1", "\[Alpha]"]}]}],
  SequenceForm[
  "RE, RN, L SOCs: ", -1 + Rational[1, 2]/$CellContext`\[Alpha], ", ", -1 + 
   Rational[1, 2]/$CellContext`\[Alpha], 
   ", ", -2 + $CellContext`\[Alpha]^(-1)],
  Editable->False]], "Print",
 CellChangeTimes->{
  3.763840553171976*^9, {3.7638426406136923`*^9, 3.7638426547936583`*^9}, 
   3.763923508664912*^9, 3.7639243271718807`*^9, 3.763934847713293*^9, 
   3.76393494923569*^9, 3.763935009163783*^9, 3.763935065833124*^9, 
   3.76393511399654*^9, 3.76393526166133*^9, 3.763935561078165*^9, 
   3.763942211145645*^9},
 CellLabel->
  "During evaluation of \
In[1]:=",ExpressionUUID->"833d44a2-eedf-4917-ae62-af38a5812632"],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"RE, RN, L FOC solutions: \"\>", "\[InvisibleSpace]", 
   RowBox[{"{", 
    RowBox[{"{", 
     RowBox[{"qre", "\[Rule]", 
      FractionBox[
       RowBox[{"b", "+", 
        RowBox[{"2", " ", 
         RowBox[{"(", 
          RowBox[{
           RowBox[{
            RowBox[{"-", "2"}], " ", "ql"}], "+", "v", "+", 
           RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "+", 
           "\[CapitalDelta]"}], ")"}]}]}], 
       RowBox[{
        RowBox[{"-", "4"}], "+", 
        RowBox[{"8", " ", "\[Alpha]"}]}]]}], "}"}], "}"}], 
   "\[InvisibleSpace]", "\<\", \"\>", "\[InvisibleSpace]", 
   RowBox[{"{", 
    RowBox[{"{", 
     RowBox[{"qrn", "\[Rule]", 
      FractionBox[
       RowBox[{"b", "+", 
        RowBox[{"2", " ", 
         RowBox[{"(", 
          RowBox[{
           RowBox[{
            RowBox[{"-", "2"}], " ", "ql"}], "+", "v", "+", 
           RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "+", 
           "\[CapitalDelta]"}], ")"}]}]}], 
       RowBox[{
        RowBox[{"-", "4"}], "+", 
        RowBox[{"8", " ", "\[Alpha]"}]}]]}], "}"}], "}"}], 
   "\[InvisibleSpace]", "\<\", \"\>", "\[InvisibleSpace]", 
   RowBox[{"{", 
    RowBox[{"{", 
     RowBox[{"ql", "\[Rule]", 
      FractionBox[
       RowBox[{"b", "+", 
        RowBox[{"2", " ", 
         RowBox[{"(", 
          RowBox[{"qre", "+", "qrn", "-", "v", "+", 
           RowBox[{"2", " ", "xm"}], "-", "\[Alpha]", "-", 
           "\[CapitalDelta]"}], ")"}]}]}], 
       RowBox[{"4", "-", 
        RowBox[{"8", " ", "\[Alpha]"}]}]]}], "}"}], "}"}]}],
  SequenceForm[
  "RE, RN, L FOC solutions: ", {{$CellContext`qre -> (-4 + 
        8 $CellContext`\[Alpha])^(-1) ($CellContext`b + 
       2 ((-2) $CellContext`ql + $CellContext`v + 
         2 $CellContext`xm + $CellContext`\[Alpha] + $CellContext`\
\[CapitalDelta]))}}, 
   ", ", {{$CellContext`qrn -> (-4 + 
        8 $CellContext`\[Alpha])^(-1) ($CellContext`b + 
       2 ((-2) $CellContext`ql + $CellContext`v + 
         2 $CellContext`xm + $CellContext`\[Alpha] + $CellContext`\
\[CapitalDelta]))}}, 
   ", ", {{$CellContext`ql -> (4 - 
        8 $CellContext`\[Alpha])^(-1) ($CellContext`b + 
       2 ($CellContext`qre + $CellContext`qrn - $CellContext`v + 
         2 $CellContext`xm - $CellContext`\[Alpha] - $CellContext`\
\[CapitalDelta]))}}],
  Editable->False]], "Print",
 CellChangeTimes->{
  3.763840553171976*^9, {3.7638426406136923`*^9, 3.7638426547936583`*^9}, 
   3.763923508664912*^9, 3.7639243271718807`*^9, 3.763934847713293*^9, 
   3.76393494923569*^9, 3.763935009163783*^9, 3.763935065833124*^9, 
   3.76393511399654*^9, 3.76393526166133*^9, 3.763935561078165*^9, 
   3.763942211162326*^9},
 CellLabel->
  "During evaluation of \
In[1]:=",ExpressionUUID->"56849a09-c373-4ace-ac16-756f1bdac29b"]
}, Open  ]],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"ql", "\[Rule]", 
     FractionBox[
      RowBox[{
       RowBox[{"2", " ", "v", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}]}], "+", 
       RowBox[{"2", " ", 
        SuperscriptBox["\[Alpha]", "2"]}], "-", 
       RowBox[{"\[Alpha]", " ", 
        RowBox[{"(", 
         RowBox[{"2", "+", "b", "+", 
          RowBox[{"4", " ", "xm"}], "-", 
          RowBox[{"2", " ", "\[CapitalDelta]"}]}], ")"}]}], "-", 
       RowBox[{"2", " ", "\[CapitalDelta]"}]}], 
      RowBox[{"8", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], " ", "\[Alpha]"}]]}], 
    ",", 
    RowBox[{"qre", "\[Rule]", 
     FractionBox[
      RowBox[{
       RowBox[{"2", " ", "v", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}]}], "+", 
       RowBox[{"2", " ", 
        SuperscriptBox["\[Alpha]", "2"]}], "-", 
       RowBox[{"2", " ", "\[CapitalDelta]"}], "+", 
       RowBox[{"\[Alpha]", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "2"}], "+", "b", "+", 
          RowBox[{"4", " ", "xm"}], "+", 
          RowBox[{"2", " ", "\[CapitalDelta]"}]}], ")"}]}]}], 
      RowBox[{"8", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], " ", "\[Alpha]"}]]}], 
    ",", 
    RowBox[{"qrn", "\[Rule]", 
     FractionBox[
      RowBox[{
       RowBox[{"2", " ", "v", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}]}], "+", 
       RowBox[{"2", " ", 
        SuperscriptBox["\[Alpha]", "2"]}], "-", 
       RowBox[{"2", " ", "\[CapitalDelta]"}], "+", 
       RowBox[{"\[Alpha]", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "2"}], "+", "b", "+", 
          RowBox[{"4", " ", "xm"}], "+", 
          RowBox[{"2", " ", "\[CapitalDelta]"}]}], ")"}]}]}], 
      RowBox[{"8", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], " ", "\[Alpha]"}]]}]}],
    "}"}], "}"}]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211260251*^9},
 CellLabel->"Out[48]=",ExpressionUUID->"c60396ba-b931-47a4-bb12-912929b460cd"],

Cell[BoxData[
 InterpretationBox[Cell[
  "Case 3  Primaries for party L only", "Subsubsection",ExpressionUUID->
   "8bd46c44-d911-4424-bfab-97e0ff9016cc"],
  TextCell["Case 3  Primaries for party L only", "Subsubsection"]]], "Output",\

 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.7639422112771997`*^9},
 CellLabel->"Out[50]=",ExpressionUUID->"26b7e3e5-f534-49f2-b438-55615dee9f42"],

Cell[BoxData[
 InterpretationBox[Cell[
  "R (elite) objective when facing L with primaries", "Text",ExpressionUUID->
   "ee0b8485-961a-48bd-908e-0aab19e7edba"],
  TextCell[
  "R (elite) objective when facing L with primaries", "Text"]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211284577*^9},
 CellLabel->"Out[51]=",ExpressionUUID->"e0288476-0608-4272-97be-33eecc92c38c"],

Cell[BoxData[
 RowBox[{
  FractionBox["1", 
   RowBox[{"8", " ", "\[Alpha]"}]], 
  RowBox[{"(", 
   RowBox[{
    RowBox[{"b", " ", 
     RowBox[{"(", 
      RowBox[{"qle", "+", "qln", "-", 
       RowBox[{"2", " ", 
        RowBox[{"(", 
         RowBox[{"qr", "+", "v", "+", "\[CapitalDelta]"}], ")"}]}]}], ")"}]}],
     "+", 
    RowBox[{"2", " ", 
     RowBox[{"(", 
      RowBox[{
       SuperscriptBox["qle", "2"], "+", 
       SuperscriptBox["qln", "2"], "-", 
       RowBox[{"qle", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"2", " ", "qr"}], "+", "v", "+", 
          RowBox[{"2", " ", "xm"}], "-", "\[Alpha]", "+", "\[CapitalDelta]"}],
          ")"}]}], "-", 
       RowBox[{"qln", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"2", " ", "qr"}], "+", "v", "+", 
          RowBox[{"2", " ", "xm"}], "-", "\[Alpha]", "+", "\[CapitalDelta]"}],
          ")"}]}], "+", 
       RowBox[{"2", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"2", " ", "v", " ", "xm"}], "+", 
          RowBox[{
           SuperscriptBox["qr", "2"], " ", 
           RowBox[{"(", 
            RowBox[{"1", "-", 
             RowBox[{"2", " ", "\[Alpha]"}]}], ")"}]}], "+", 
          RowBox[{"v", " ", "\[Alpha]"}], "+", 
          RowBox[{"2", " ", "xm", " ", "\[CapitalDelta]"}], "-", 
          RowBox[{"\[Alpha]", " ", "\[CapitalDelta]"}], "+", 
          RowBox[{"qr", " ", 
           RowBox[{"(", 
            RowBox[{"v", "+", 
             RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "+", 
             "\[CapitalDelta]"}], ")"}]}]}], ")"}]}]}], ")"}]}]}], 
   ")"}]}]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.76394221129215*^9},
 CellLabel->"Out[53]=",ExpressionUUID->"ec392653-7d0b-4845-9816-137bff766d91"],

Cell[BoxData[
 InterpretationBox[Cell[
  "R (non-elite) objective when facing L with primaries", "Text",
   ExpressionUUID->"6283d2a7-3ed4-47ba-8cd7-350102b85b0f"],
  TextCell[
  "R (non-elite) objective when facing L with primaries", "Text"]]], "Output",\

 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.7639422113001137`*^9},
 CellLabel->"Out[54]=",ExpressionUUID->"a2bb6aa6-c4f5-47a4-8ecf-a8679faa546a"],

Cell[BoxData[
 FractionBox[
  RowBox[{
   RowBox[{"b", " ", 
    RowBox[{"(", 
     RowBox[{"qle", "+", "qln", "-", 
      RowBox[{"2", " ", 
       RowBox[{"(", 
        RowBox[{"qr", "+", "\[CapitalDelta]"}], ")"}]}]}], ")"}]}], "+", 
   RowBox[{"2", " ", 
    RowBox[{"(", 
     RowBox[{
      SuperscriptBox["qle", "2"], "+", 
      SuperscriptBox["qln", "2"], "-", 
      RowBox[{"qle", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"2", " ", "qr"}], "+", 
         RowBox[{"2", " ", "xm"}], "-", "\[Alpha]", "+", "\[CapitalDelta]"}], 
        ")"}]}], "-", 
      RowBox[{"qln", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"2", " ", "qr"}], "+", 
         RowBox[{"2", " ", "xm"}], "-", "\[Alpha]", "+", "\[CapitalDelta]"}], 
        ")"}]}], "+", 
      RowBox[{"2", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          SuperscriptBox["qr", "2"], " ", 
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", " ", "\[Alpha]"}]}], ")"}]}], "+", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            RowBox[{"2", " ", "xm"}], "-", "\[Alpha]"}], ")"}], " ", 
          "\[CapitalDelta]"}], "+", 
         RowBox[{"qr", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "+", 
            "\[CapitalDelta]"}], ")"}]}]}], ")"}]}]}], ")"}]}]}], 
  RowBox[{"8", " ", "\[Alpha]"}]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211307971*^9},
 CellLabel->"Out[56]=",ExpressionUUID->"5af932c5-eaaa-479d-9040-c69f69309a63"],

Cell[BoxData[
 InterpretationBox[Cell[
  "L elite objective facing R with primaries", "Text",ExpressionUUID->
   "939a07f1-aa5d-4048-8556-f6c261765637"],
  TextCell["L elite objective facing R with primaries", "Text"]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.76394221131623*^9},
 CellLabel->"Out[57]=",ExpressionUUID->"9cfb832a-471c-4bd2-a869-37e3201dd3d8"],

Cell[BoxData[
 RowBox[{
  FractionBox["1", 
   RowBox[{"8", " ", "\[Alpha]"}]], 
  RowBox[{"(", 
   RowBox[{
    RowBox[{"b", " ", 
     RowBox[{"(", 
      RowBox[{"qle", "+", "qln", "-", 
       RowBox[{"2", " ", "qr"}], "+", "v", "+", 
       RowBox[{"2", " ", "\[CapitalDelta]"}]}], ")"}]}], "+", 
    RowBox[{"2", " ", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{"2", " ", 
        SuperscriptBox["qr", "2"]}], "-", 
       RowBox[{"qr", " ", "v"}], "+", 
       RowBox[{"4", " ", "qr", " ", "xm"}], "-", 
       RowBox[{"2", " ", "v", " ", "xm"}], "+", 
       RowBox[{
        SuperscriptBox["qle", "2"], " ", 
        RowBox[{"(", 
         RowBox[{"1", "-", 
          RowBox[{"2", " ", "\[Alpha]"}]}], ")"}]}], "+", 
       RowBox[{
        SuperscriptBox["qln", "2"], " ", 
        RowBox[{"(", 
         RowBox[{"1", "-", 
          RowBox[{"2", " ", "\[Alpha]"}]}], ")"}]}], "+", 
       RowBox[{"2", " ", "qr", " ", "\[Alpha]"}], "+", 
       RowBox[{"v", " ", "\[Alpha]"}], "-", 
       RowBox[{"2", " ", "qr", " ", "\[CapitalDelta]"}], "-", 
       RowBox[{"4", " ", "xm", " ", "\[CapitalDelta]"}], "-", 
       RowBox[{"2", " ", "\[Alpha]", " ", "\[CapitalDelta]"}], "+", 
       RowBox[{"qln", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{
           RowBox[{"-", "2"}], " ", "qr"}], "-", 
          RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "+", "\[CapitalDelta]"}],
          ")"}]}], "+", 
       RowBox[{"qle", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{
           RowBox[{"-", "2"}], " ", "qr"}], "+", "v", "-", 
          RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "+", "\[CapitalDelta]"}],
          ")"}]}]}], ")"}]}]}], ")"}]}]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211323597*^9},
 CellLabel->"Out[59]=",ExpressionUUID->"a29da70a-2289-4c3d-8a9c-17516343be95"],

Cell[BoxData[
 InterpretationBox[Cell[
  "L non-elite objective facing R with primaries", "Text",ExpressionUUID->
   "5b19ef93-fa34-402e-98aa-944cb40cb88e"],
  TextCell[
  "L non-elite objective facing R with primaries", "Text"]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211331287*^9},
 CellLabel->"Out[60]=",ExpressionUUID->"52d56f62-c9a8-422e-a1f9-c6e5867ac7cb"],

Cell[BoxData[
 RowBox[{
  FractionBox["1", 
   RowBox[{"8", " ", "\[Alpha]"}]], 
  RowBox[{"(", 
   RowBox[{
    RowBox[{"b", " ", 
     RowBox[{"(", 
      RowBox[{"qle", "+", "qln", "-", 
       RowBox[{"2", " ", "qr"}], "+", "v", "+", 
       RowBox[{"2", " ", "\[CapitalDelta]"}]}], ")"}]}], "+", 
    RowBox[{"2", " ", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{"2", " ", 
        SuperscriptBox["qr", "2"]}], "-", 
       RowBox[{"qr", " ", "v"}], "+", 
       RowBox[{"4", " ", "qr", " ", "xm"}], "-", 
       RowBox[{"2", " ", "v", " ", "xm"}], "+", 
       RowBox[{
        SuperscriptBox["qle", "2"], " ", 
        RowBox[{"(", 
         RowBox[{"1", "-", 
          RowBox[{"2", " ", "\[Alpha]"}]}], ")"}]}], "+", 
       RowBox[{
        SuperscriptBox["qln", "2"], " ", 
        RowBox[{"(", 
         RowBox[{"1", "-", 
          RowBox[{"2", " ", "\[Alpha]"}]}], ")"}]}], "+", 
       RowBox[{"2", " ", "qr", " ", "\[Alpha]"}], "+", 
       RowBox[{"v", " ", "\[Alpha]"}], "-", 
       RowBox[{"2", " ", "qr", " ", "\[CapitalDelta]"}], "-", 
       RowBox[{"4", " ", "xm", " ", "\[CapitalDelta]"}], "-", 
       RowBox[{"2", " ", "\[Alpha]", " ", "\[CapitalDelta]"}], "+", 
       RowBox[{"qle", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{
           RowBox[{"-", "2"}], " ", "qr"}], "-", 
          RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "+", "\[CapitalDelta]"}],
          ")"}]}], "+", 
       RowBox[{"qln", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{
           RowBox[{"-", "2"}], " ", "qr"}], "+", "v", "-", 
          RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "+", "\[CapitalDelta]"}],
          ")"}]}]}], ")"}]}]}], ")"}]}]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.7639422113390503`*^9},
 CellLabel->"Out[62]=",ExpressionUUID->"c46f4cf2-ca46-46d0-8b07-009db59a2b5d"],

Cell[BoxData[
 InterpretationBox[Cell[
  "Period 2 policies", "Text",ExpressionUUID->
   "0082a7d8-cfdb-471e-b0f0-0ce9fb413e1e"],
  TextCell["Period 2 policies", "Text"]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211346862*^9},
 CellLabel->"Out[63]=",ExpressionUUID->"6f6067a4-f715-4456-8c94-43f606ce4028"],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"R, LE, LN FOCs: \"\>", "\[InvisibleSpace]", 
   RowBox[{"-", 
    FractionBox[
     RowBox[{"b", "-", 
      RowBox[{"2", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "qle"}], "-", "qln", "+", 
         RowBox[{"2", " ", "qr"}], "+", "v", "+", 
         RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "-", 
         RowBox[{"4", " ", "qr", " ", "\[Alpha]"}], "+", "\[CapitalDelta]"}], 
        ")"}]}]}], 
     RowBox[{"4", " ", "\[Alpha]"}]]}], "\[InvisibleSpace]", "\<\", \"\>", 
   "\[InvisibleSpace]", 
   FractionBox[
    RowBox[{"b", "+", 
     RowBox[{"2", " ", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{
         RowBox[{"-", "2"}], " ", "qr"}], "+", "v", "-", 
        RowBox[{"2", " ", "xm"}], "+", 
        RowBox[{"qle", " ", 
         RowBox[{"(", 
          RowBox[{"2", "-", 
           RowBox[{"4", " ", "\[Alpha]"}]}], ")"}]}], "+", "\[Alpha]", "+", 
        "\[CapitalDelta]"}], ")"}]}]}], 
    RowBox[{"8", " ", "\[Alpha]"}]], "\[InvisibleSpace]", "\<\", \"\>", 
   "\[InvisibleSpace]", 
   FractionBox[
    RowBox[{"b", "+", 
     RowBox[{"2", " ", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{
         RowBox[{"-", "2"}], " ", "qr"}], "+", "v", "-", 
        RowBox[{"2", " ", "xm"}], "+", 
        RowBox[{"qln", " ", 
         RowBox[{"(", 
          RowBox[{"2", "-", 
           RowBox[{"4", " ", "\[Alpha]"}]}], ")"}]}], "+", "\[Alpha]", "+", 
        "\[CapitalDelta]"}], ")"}]}]}], 
    RowBox[{"8", " ", "\[Alpha]"}]]}],
  SequenceForm[
  "R, LE, LN FOCs: ", 
   Rational[-1, 4] $CellContext`\[Alpha]^(-1) ($CellContext`b - 
    2 (-$CellContext`qle - $CellContext`qln + 
     2 $CellContext`qr + $CellContext`v + 
     2 $CellContext`xm + $CellContext`\[Alpha] - 
     4 $CellContext`qr $CellContext`\[Alpha] + $CellContext`\[CapitalDelta])),
    ", ", Rational[1, 8] $CellContext`\[Alpha]^(-1) ($CellContext`b + 
    2 ((-2) $CellContext`qr + $CellContext`v - 
      2 $CellContext`xm + $CellContext`qle (2 - 
        4 $CellContext`\[Alpha]) + $CellContext`\[Alpha] + $CellContext`\
\[CapitalDelta])), ", ", 
   Rational[1, 8] $CellContext`\[Alpha]^(-1) ($CellContext`b + 
    2 ((-2) $CellContext`qr + $CellContext`v - 
      2 $CellContext`xm + $CellContext`qln (2 - 
        4 $CellContext`\[Alpha]) + $CellContext`\[Alpha] + $CellContext`\
\[CapitalDelta]))],
  Editable->False]], "Print",
 CellChangeTimes->{
  3.763840553171976*^9, {3.7638426406136923`*^9, 3.7638426547936583`*^9}, 
   3.763923508664912*^9, 3.7639243271718807`*^9, 3.763934847713293*^9, 
   3.76393494923569*^9, 3.763935009163783*^9, 3.763935065833124*^9, 
   3.76393511399654*^9, 3.76393526166133*^9, 3.763935561078165*^9, 
   3.763942211354601*^9},
 CellLabel->
  "During evaluation of \
In[1]:=",ExpressionUUID->"268efca3-81f1-4c8b-a138-9c661dc74e98"],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"R, LE, LN SOCs: \"\>", "\[InvisibleSpace]", 
   RowBox[{
    RowBox[{"-", "2"}], "+", 
    FractionBox["1", "\[Alpha]"]}], "\[InvisibleSpace]", "\<\", \"\>", 
   "\[InvisibleSpace]", 
   RowBox[{
    RowBox[{"-", "1"}], "+", 
    FractionBox["1", 
     RowBox[{"2", " ", "\[Alpha]"}]]}], "\[InvisibleSpace]", "\<\", \"\>", 
   "\[InvisibleSpace]", 
   RowBox[{
    RowBox[{"-", "1"}], "+", 
    FractionBox["1", 
     RowBox[{"2", " ", "\[Alpha]"}]]}]}],
  SequenceForm[
  "R, LE, LN SOCs: ", -2 + $CellContext`\[Alpha]^(-1), ", ", -1 + 
   Rational[1, 2]/$CellContext`\[Alpha], ", ", -1 + 
   Rational[1, 2]/$CellContext`\[Alpha]],
  Editable->False]], "Print",
 CellChangeTimes->{
  3.763840553171976*^9, {3.7638426406136923`*^9, 3.7638426547936583`*^9}, 
   3.763923508664912*^9, 3.7639243271718807`*^9, 3.763934847713293*^9, 
   3.76393494923569*^9, 3.763935009163783*^9, 3.763935065833124*^9, 
   3.76393511399654*^9, 3.76393526166133*^9, 3.763935561078165*^9, 
   3.763942211361594*^9},
 CellLabel->
  "During evaluation of \
In[1]:=",ExpressionUUID->"ee6d1853-b1d6-4f5b-8db5-589cc674affc"],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"R, LE, LN FOC solutions: \"\>", "\[InvisibleSpace]", 
   RowBox[{"{", 
    RowBox[{"{", 
     RowBox[{"qr", "\[Rule]", 
      FractionBox[
       RowBox[{
        RowBox[{"-", "b"}], "+", 
        RowBox[{"2", " ", 
         RowBox[{"(", 
          RowBox[{
           RowBox[{"-", "qle"}], "-", "qln", "+", "v", "+", 
           RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "+", 
           "\[CapitalDelta]"}], ")"}]}]}], 
       RowBox[{
        RowBox[{"-", "4"}], "+", 
        RowBox[{"8", " ", "\[Alpha]"}]}]]}], "}"}], "}"}], 
   "\[InvisibleSpace]", "\<\", \"\>", "\[InvisibleSpace]", 
   RowBox[{"{", 
    RowBox[{"{", 
     RowBox[{"qle", "\[Rule]", 
      FractionBox[
       RowBox[{"b", "+", 
        RowBox[{"2", " ", 
         RowBox[{"(", 
          RowBox[{
           RowBox[{
            RowBox[{"-", "2"}], " ", "qr"}], "+", "v", "-", 
           RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "+", 
           "\[CapitalDelta]"}], ")"}]}]}], 
       RowBox[{
        RowBox[{"-", "4"}], "+", 
        RowBox[{"8", " ", "\[Alpha]"}]}]]}], "}"}], "}"}], 
   "\[InvisibleSpace]", "\<\", \"\>", "\[InvisibleSpace]", 
   RowBox[{"{", 
    RowBox[{"{", 
     RowBox[{"qln", "\[Rule]", 
      FractionBox[
       RowBox[{"b", "+", 
        RowBox[{"2", " ", 
         RowBox[{"(", 
          RowBox[{
           RowBox[{
            RowBox[{"-", "2"}], " ", "qr"}], "+", "v", "-", 
           RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "+", 
           "\[CapitalDelta]"}], ")"}]}]}], 
       RowBox[{
        RowBox[{"-", "4"}], "+", 
        RowBox[{"8", " ", "\[Alpha]"}]}]]}], "}"}], "}"}]}],
  SequenceForm[
  "R, LE, LN FOC solutions: ", {{$CellContext`qr -> (-4 + 
        8 $CellContext`\[Alpha])^(-1) (-$CellContext`b + 
       2 (-$CellContext`qle - $CellContext`qln + $CellContext`v + 
         2 $CellContext`xm + $CellContext`\[Alpha] + $CellContext`\
\[CapitalDelta]))}}, 
   ", ", {{$CellContext`qle -> (-4 + 
        8 $CellContext`\[Alpha])^(-1) ($CellContext`b + 
       2 ((-2) $CellContext`qr + $CellContext`v - 
         2 $CellContext`xm + $CellContext`\[Alpha] + $CellContext`\
\[CapitalDelta]))}}, 
   ", ", {{$CellContext`qln -> (-4 + 
        8 $CellContext`\[Alpha])^(-1) ($CellContext`b + 
       2 ((-2) $CellContext`qr + $CellContext`v - 
         2 $CellContext`xm + $CellContext`\[Alpha] + $CellContext`\
\[CapitalDelta]))}}],
  Editable->False]], "Print",
 CellChangeTimes->{
  3.763840553171976*^9, {3.7638426406136923`*^9, 3.7638426547936583`*^9}, 
   3.763923508664912*^9, 3.7639243271718807`*^9, 3.763934847713293*^9, 
   3.76393494923569*^9, 3.763935009163783*^9, 3.763935065833124*^9, 
   3.76393511399654*^9, 3.76393526166133*^9, 3.763935561078165*^9, 
   3.7639422113781157`*^9},
 CellLabel->
  "During evaluation of \
In[1]:=",ExpressionUUID->"87f2e15a-aae5-466f-9c1d-65c275f7712f"]
}, Open  ]],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"qr", "\[Rule]", 
     FractionBox[
      RowBox[{
       RowBox[{"2", " ", "v", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}]}], "+", 
       RowBox[{"2", " ", 
        SuperscriptBox["\[Alpha]", "2"]}], "-", 
       RowBox[{"\[Alpha]", " ", 
        RowBox[{"(", 
         RowBox[{"2", "+", "b", "-", 
          RowBox[{"4", " ", "xm"}], "-", 
          RowBox[{"2", " ", "\[CapitalDelta]"}]}], ")"}]}], "-", 
       RowBox[{"2", " ", "\[CapitalDelta]"}]}], 
      RowBox[{"8", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], " ", "\[Alpha]"}]]}], 
    ",", 
    RowBox[{"qle", "\[Rule]", 
     FractionBox[
      RowBox[{
       RowBox[{"2", " ", "v", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}]}], "+", 
       RowBox[{"2", " ", 
        SuperscriptBox["\[Alpha]", "2"]}], "-", 
       RowBox[{"2", " ", "\[CapitalDelta]"}], "+", 
       RowBox[{"\[Alpha]", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "2"}], "+", "b", "-", 
          RowBox[{"4", " ", "xm"}], "+", 
          RowBox[{"2", " ", "\[CapitalDelta]"}]}], ")"}]}]}], 
      RowBox[{"8", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], " ", "\[Alpha]"}]]}], 
    ",", 
    RowBox[{"qln", "\[Rule]", 
     FractionBox[
      RowBox[{
       RowBox[{"2", " ", "v", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}]}], "+", 
       RowBox[{"2", " ", 
        SuperscriptBox["\[Alpha]", "2"]}], "-", 
       RowBox[{"2", " ", "\[CapitalDelta]"}], "+", 
       RowBox[{"\[Alpha]", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "2"}], "+", "b", "-", 
          RowBox[{"4", " ", "xm"}], "+", 
          RowBox[{"2", " ", "\[CapitalDelta]"}]}], ")"}]}]}], 
      RowBox[{"8", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], " ", "\[Alpha]"}]]}]}],
    "}"}], "}"}]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211386282*^9},
 CellLabel->"Out[67]=",ExpressionUUID->"8b8dc532-81b4-4a8c-93a2-b527c4e5b86f"],

Cell[BoxData[
 InterpretationBox[Cell[
  "Case 4   Primaries for both parties", "Subsubsection",ExpressionUUID->
   "794984ee-587c-4dc4-855b-db4478c6d8ba"],
  TextCell["Case 4   Primaries for both parties", "Subsubsection"]]], "Output",\

 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211403433*^9},
 CellLabel->"Out[69]=",ExpressionUUID->"5bed58c1-00d9-46fe-805e-35948d042574"],

Cell[BoxData[
 InterpretationBox[Cell[
  "R elite objective", "Text",ExpressionUUID->
   "abd7346b-e1e8-45b5-b0bf-8af222fbb10c"],
  TextCell["R elite objective", "Text"]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211410907*^9},
 CellLabel->"Out[70]=",ExpressionUUID->"bf3b4a66-5bf5-4b3d-81d5-4c1c521a4d8f"],

Cell[BoxData[
 RowBox[{
  FractionBox["1", 
   RowBox[{"8", " ", "\[Alpha]"}]], 
  RowBox[{"(", 
   RowBox[{
    RowBox[{"2", " ", 
     SuperscriptBox["qle", "2"]}], "+", 
    RowBox[{"2", " ", 
     SuperscriptBox["qln", "2"]}], "-", 
    RowBox[{"qle", " ", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{"2", " ", "qre"}], "+", 
       RowBox[{"2", " ", "qrn"}], "+", "v", "+", 
       RowBox[{"4", " ", "xm"}], "-", 
       RowBox[{"2", " ", "\[Alpha]"}], "+", 
       RowBox[{"2", " ", "\[CapitalDelta]"}]}], ")"}]}], "-", 
    RowBox[{"qln", " ", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{"2", " ", "qre"}], "+", 
       RowBox[{"2", " ", "qrn"}], "+", "v", "+", 
       RowBox[{"4", " ", "xm"}], "-", 
       RowBox[{"2", " ", "\[Alpha]"}], "+", 
       RowBox[{"2", " ", "\[CapitalDelta]"}]}], ")"}]}], "+", 
    RowBox[{"2", " ", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{"2", " ", "v", " ", "xm"}], "+", 
       RowBox[{
        SuperscriptBox["qre", "2"], " ", 
        RowBox[{"(", 
         RowBox[{"1", "-", 
          RowBox[{"2", " ", "\[Alpha]"}]}], ")"}]}], "+", 
       RowBox[{
        SuperscriptBox["qrn", "2"], " ", 
        RowBox[{"(", 
         RowBox[{"1", "-", 
          RowBox[{"2", " ", "\[Alpha]"}]}], ")"}]}], "+", 
       RowBox[{"v", " ", "\[Alpha]"}], "+", 
       RowBox[{"4", " ", "xm", " ", "\[CapitalDelta]"}], "-", 
       RowBox[{"2", " ", "\[Alpha]", " ", "\[CapitalDelta]"}], "+", 
       RowBox[{"qrn", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "+", "\[CapitalDelta]"}],
          ")"}]}], "+", 
       RowBox[{"qre", " ", 
        RowBox[{"(", 
         RowBox[{"v", "+", 
          RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "+", "\[CapitalDelta]"}],
          ")"}]}]}], ")"}]}]}], ")"}]}]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211418682*^9},
 CellLabel->"Out[72]=",ExpressionUUID->"4bf8a431-fbdb-440b-8c6e-514de8ba9b84"],

Cell[BoxData[
 InterpretationBox[Cell[
  "R non-elite objective", "Text",ExpressionUUID->
   "bb77e577-6c2f-4fe1-96ff-143d0b64da62"],
  TextCell["R non-elite objective", "Text"]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.76394221142649*^9},
 CellLabel->"Out[73]=",ExpressionUUID->"91420b9d-a0f1-4245-828a-fa70645921fd"],

Cell[BoxData[
 RowBox[{
  FractionBox["1", 
   RowBox[{"8", " ", "\[Alpha]"}]], 
  RowBox[{"(", 
   RowBox[{
    RowBox[{"2", " ", 
     SuperscriptBox["qle", "2"]}], "+", 
    RowBox[{"2", " ", 
     SuperscriptBox["qln", "2"]}], "-", 
    RowBox[{"qle", " ", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{"2", " ", "qre"}], "+", 
       RowBox[{"2", " ", "qrn"}], "+", "v", "+", 
       RowBox[{"4", " ", "xm"}], "-", 
       RowBox[{"2", " ", "\[Alpha]"}], "+", 
       RowBox[{"2", " ", "\[CapitalDelta]"}]}], ")"}]}], "-", 
    RowBox[{"qln", " ", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{"2", " ", "qre"}], "+", 
       RowBox[{"2", " ", "qrn"}], "+", "v", "+", 
       RowBox[{"4", " ", "xm"}], "-", 
       RowBox[{"2", " ", "\[Alpha]"}], "+", 
       RowBox[{"2", " ", "\[CapitalDelta]"}]}], ")"}]}], "+", 
    RowBox[{"2", " ", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{"2", " ", "v", " ", "xm"}], "+", 
       RowBox[{
        SuperscriptBox["qre", "2"], " ", 
        RowBox[{"(", 
         RowBox[{"1", "-", 
          RowBox[{"2", " ", "\[Alpha]"}]}], ")"}]}], "+", 
       RowBox[{
        SuperscriptBox["qrn", "2"], " ", 
        RowBox[{"(", 
         RowBox[{"1", "-", 
          RowBox[{"2", " ", "\[Alpha]"}]}], ")"}]}], "+", 
       RowBox[{"v", " ", "\[Alpha]"}], "+", 
       RowBox[{"4", " ", "xm", " ", "\[CapitalDelta]"}], "-", 
       RowBox[{"2", " ", "\[Alpha]", " ", "\[CapitalDelta]"}], "+", 
       RowBox[{"qre", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "+", "\[CapitalDelta]"}],
          ")"}]}], "+", 
       RowBox[{"qrn", " ", 
        RowBox[{"(", 
         RowBox[{"v", "+", 
          RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "+", "\[CapitalDelta]"}],
          ")"}]}]}], ")"}]}]}], ")"}]}]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.76394221143369*^9},
 CellLabel->"Out[75]=",ExpressionUUID->"70ba2762-7a1c-4da6-b5d1-5f4385b944e0"],

Cell[BoxData[
 InterpretationBox[Cell[
  "L elite objective", "Text",ExpressionUUID->
   "03a1e80e-73b7-4543-9915-9e7474c1e5c9"],
  TextCell["L elite objective", "Text"]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211441182*^9},
 CellLabel->"Out[76]=",ExpressionUUID->"ff81bba3-eadb-4e3d-ac70-c256db459fe7"],

Cell[BoxData[
 RowBox[{
  FractionBox["1", 
   RowBox[{"8", " ", "\[Alpha]"}]], 
  RowBox[{"(", 
   RowBox[{
    RowBox[{"2", " ", 
     SuperscriptBox["qre", "2"]}], "+", 
    RowBox[{"2", " ", 
     SuperscriptBox["qrn", "2"]}], "-", 
    RowBox[{"qre", " ", "v"}], "-", 
    RowBox[{"qrn", " ", "v"}], "+", 
    RowBox[{"4", " ", "qre", " ", "xm"}], "+", 
    RowBox[{"4", " ", "qrn", " ", "xm"}], "-", 
    RowBox[{"4", " ", "v", " ", "xm"}], "+", 
    RowBox[{
     SuperscriptBox["qle", "2"], " ", 
     RowBox[{"(", 
      RowBox[{"2", "-", 
       RowBox[{"4", " ", "\[Alpha]"}]}], ")"}]}], "+", 
    RowBox[{
     SuperscriptBox["qln", "2"], " ", 
     RowBox[{"(", 
      RowBox[{"2", "-", 
       RowBox[{"4", " ", "\[Alpha]"}]}], ")"}]}], "+", 
    RowBox[{"2", " ", "qre", " ", "\[Alpha]"}], "+", 
    RowBox[{"2", " ", "qrn", " ", "\[Alpha]"}], "+", 
    RowBox[{"2", " ", "v", " ", "\[Alpha]"}], "-", 
    RowBox[{"2", " ", "qln", " ", 
     RowBox[{"(", 
      RowBox[{"qre", "+", "qrn", "+", 
       RowBox[{"2", " ", "xm"}], "-", "\[Alpha]", "-", "\[CapitalDelta]"}], 
      ")"}]}], "-", 
    RowBox[{"2", " ", "qle", " ", 
     RowBox[{"(", 
      RowBox[{"qre", "+", "qrn", "-", "v", "+", 
       RowBox[{"2", " ", "xm"}], "-", "\[Alpha]", "-", "\[CapitalDelta]"}], 
      ")"}]}], "-", 
    RowBox[{"2", " ", "qre", " ", "\[CapitalDelta]"}], "-", 
    RowBox[{"2", " ", "qrn", " ", "\[CapitalDelta]"}], "-", 
    RowBox[{"8", " ", "xm", " ", "\[CapitalDelta]"}], "-", 
    RowBox[{"4", " ", "\[Alpha]", " ", "\[CapitalDelta]"}]}], 
   ")"}]}]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211448472*^9},
 CellLabel->"Out[78]=",ExpressionUUID->"4729331b-dc38-4366-82a9-ff5d6895e478"],

Cell[BoxData[
 InterpretationBox[Cell[
  "L non-elite objective", "Text",ExpressionUUID->
   "0bb346bb-324d-4e3a-936d-00edd17fd6e4"],
  TextCell["L non-elite objective", "Text"]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.7639422114564657`*^9},
 CellLabel->"Out[79]=",ExpressionUUID->"c08826c4-3be7-4f06-8642-15a9f1f6080a"],

Cell[BoxData[
 RowBox[{
  FractionBox["1", 
   RowBox[{"8", " ", "\[Alpha]"}]], 
  RowBox[{"(", 
   RowBox[{
    RowBox[{"2", " ", 
     SuperscriptBox["qre", "2"]}], "+", 
    RowBox[{"2", " ", 
     SuperscriptBox["qrn", "2"]}], "-", 
    RowBox[{"qre", " ", "v"}], "-", 
    RowBox[{"qrn", " ", "v"}], "+", 
    RowBox[{"4", " ", "qre", " ", "xm"}], "+", 
    RowBox[{"4", " ", "qrn", " ", "xm"}], "-", 
    RowBox[{"4", " ", "v", " ", "xm"}], "+", 
    RowBox[{
     SuperscriptBox["qle", "2"], " ", 
     RowBox[{"(", 
      RowBox[{"2", "-", 
       RowBox[{"4", " ", "\[Alpha]"}]}], ")"}]}], "+", 
    RowBox[{
     SuperscriptBox["qln", "2"], " ", 
     RowBox[{"(", 
      RowBox[{"2", "-", 
       RowBox[{"4", " ", "\[Alpha]"}]}], ")"}]}], "+", 
    RowBox[{"2", " ", "qre", " ", "\[Alpha]"}], "+", 
    RowBox[{"2", " ", "qrn", " ", "\[Alpha]"}], "+", 
    RowBox[{"2", " ", "v", " ", "\[Alpha]"}], "-", 
    RowBox[{"2", " ", "qle", " ", 
     RowBox[{"(", 
      RowBox[{"qre", "+", "qrn", "+", 
       RowBox[{"2", " ", "xm"}], "-", "\[Alpha]", "-", "\[CapitalDelta]"}], 
      ")"}]}], "-", 
    RowBox[{"2", " ", "qln", " ", 
     RowBox[{"(", 
      RowBox[{"qre", "+", "qrn", "-", "v", "+", 
       RowBox[{"2", " ", "xm"}], "-", "\[Alpha]", "-", "\[CapitalDelta]"}], 
      ")"}]}], "-", 
    RowBox[{"2", " ", "qre", " ", "\[CapitalDelta]"}], "-", 
    RowBox[{"2", " ", "qrn", " ", "\[CapitalDelta]"}], "-", 
    RowBox[{"8", " ", "xm", " ", "\[CapitalDelta]"}], "-", 
    RowBox[{"4", " ", "\[Alpha]", " ", "\[CapitalDelta]"}]}], 
   ")"}]}]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211464635*^9},
 CellLabel->"Out[81]=",ExpressionUUID->"a3a78f7b-c734-4e3b-aae4-fc896893a79a"],

Cell[BoxData[
 InterpretationBox[Cell[
  "Period 2 policies", "Text",ExpressionUUID->
   "32327188-9541-4d3a-9ff3-cfc47cf98a43"],
  TextCell["Period 2 policies", "Text"]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211472581*^9},
 CellLabel->"Out[82]=",ExpressionUUID->"faa22f8a-c568-408d-b5d0-01bf8b78635f"],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"RE, RN, LE, LN FOCs: \"\>", "\[InvisibleSpace]", 
   FractionBox[
    RowBox[{
     RowBox[{"-", "qle"}], "-", "qln", "+", 
     RowBox[{"2", " ", "qre"}], "+", "v", "+", 
     RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "-", 
     RowBox[{"4", " ", "qre", " ", "\[Alpha]"}], "+", "\[CapitalDelta]"}], 
    RowBox[{"4", " ", "\[Alpha]"}]], "\[InvisibleSpace]", "\<\", \"\>", 
   "\[InvisibleSpace]", 
   FractionBox[
    RowBox[{
     RowBox[{"-", "qle"}], "-", "qln", "+", 
     RowBox[{"2", " ", "qrn"}], "+", "v", "+", 
     RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "-", 
     RowBox[{"4", " ", "qrn", " ", "\[Alpha]"}], "+", "\[CapitalDelta]"}], 
    RowBox[{"4", " ", "\[Alpha]"}]], "\[InvisibleSpace]", "\<\", \"\>", 
   "\[InvisibleSpace]", 
   FractionBox[
    RowBox[{
     RowBox[{"2", " ", "qle"}], "-", "qre", "-", "qrn", "+", "v", "-", 
     RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "-", 
     RowBox[{"4", " ", "qle", " ", "\[Alpha]"}], "+", "\[CapitalDelta]"}], 
    RowBox[{"4", " ", "\[Alpha]"}]], "\[InvisibleSpace]", "\<\", \"\>", 
   "\[InvisibleSpace]", 
   FractionBox[
    RowBox[{
     RowBox[{"2", " ", "qln"}], "-", "qre", "-", "qrn", "+", "v", "-", 
     RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "-", 
     RowBox[{"4", " ", "qln", " ", "\[Alpha]"}], "+", "\[CapitalDelta]"}], 
    RowBox[{"4", " ", "\[Alpha]"}]]}],
  SequenceForm[
  "RE, RN, LE, LN FOCs: ", 
   Rational[1, 
     4] $CellContext`\[Alpha]^(-1) (-$CellContext`qle - $CellContext`qln + 
    2 $CellContext`qre + $CellContext`v + 
    2 $CellContext`xm + $CellContext`\[Alpha] - 
    4 $CellContext`qre $CellContext`\[Alpha] + $CellContext`\[CapitalDelta]), 
   ", ", Rational[
    1, 4] $CellContext`\[Alpha]^(-1) (-$CellContext`qle - $CellContext`qln + 
    2 $CellContext`qrn + $CellContext`v + 
    2 $CellContext`xm + $CellContext`\[Alpha] - 
    4 $CellContext`qrn $CellContext`\[Alpha] + $CellContext`\[CapitalDelta]), 
   ", ", Rational[1, 4] $CellContext`\[Alpha]^(-1) (
    2 $CellContext`qle - $CellContext`qre - $CellContext`qrn + $CellContext`v - 
    2 $CellContext`xm + $CellContext`\[Alpha] - 
    4 $CellContext`qle $CellContext`\[Alpha] + $CellContext`\[CapitalDelta]), 
   ", ", Rational[1, 4] $CellContext`\[Alpha]^(-1) (
    2 $CellContext`qln - $CellContext`qre - $CellContext`qrn + $CellContext`v - 
    2 $CellContext`xm + $CellContext`\[Alpha] - 
    4 $CellContext`qln $CellContext`\[Alpha] + $CellContext`\[CapitalDelta])],
  
  Editable->False]], "Print",
 CellChangeTimes->{
  3.763840553171976*^9, {3.7638426406136923`*^9, 3.7638426547936583`*^9}, 
   3.763923508664912*^9, 3.7639243271718807`*^9, 3.763934847713293*^9, 
   3.76393494923569*^9, 3.763935009163783*^9, 3.763935065833124*^9, 
   3.76393511399654*^9, 3.76393526166133*^9, 3.763935561078165*^9, 
   3.763942211480289*^9},
 CellLabel->
  "During evaluation of \
In[1]:=",ExpressionUUID->"fd97acee-1da2-4bdf-9e47-f51df693768f"],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"RE, RN, LE, LN SOCs: \"\>", "\[InvisibleSpace]", 
   RowBox[{
    RowBox[{"-", "1"}], "+", 
    FractionBox["1", 
     RowBox[{"2", " ", "\[Alpha]"}]]}], "\[InvisibleSpace]", "\<\", \"\>", 
   "\[InvisibleSpace]", 
   RowBox[{
    RowBox[{"-", "1"}], "+", 
    FractionBox["1", 
     RowBox[{"2", " ", "\[Alpha]"}]]}], "\[InvisibleSpace]", "\<\", \"\>", 
   "\[InvisibleSpace]", 
   RowBox[{
    RowBox[{"-", "1"}], "+", 
    FractionBox["1", 
     RowBox[{"2", " ", "\[Alpha]"}]]}], "\[InvisibleSpace]", "\<\", \"\>", 
   "\[InvisibleSpace]", 
   RowBox[{
    RowBox[{"-", "1"}], "+", 
    FractionBox["1", 
     RowBox[{"2", " ", "\[Alpha]"}]]}]}],
  SequenceForm[
  "RE, RN, LE, LN SOCs: ", -1 + Rational[1, 2]/$CellContext`\[Alpha], 
   ", ", -1 + Rational[1, 2]/$CellContext`\[Alpha], ", ", -1 + 
   Rational[1, 2]/$CellContext`\[Alpha], ", ", -1 + 
   Rational[1, 2]/$CellContext`\[Alpha]],
  Editable->False]], "Print",
 CellChangeTimes->{
  3.763840553171976*^9, {3.7638426406136923`*^9, 3.7638426547936583`*^9}, 
   3.763923508664912*^9, 3.7639243271718807`*^9, 3.763934847713293*^9, 
   3.76393494923569*^9, 3.763935009163783*^9, 3.763935065833124*^9, 
   3.76393511399654*^9, 3.76393526166133*^9, 3.763935561078165*^9, 
   3.7639422114883432`*^9},
 CellLabel->
  "During evaluation of \
In[1]:=",ExpressionUUID->"cdad1b6b-b41f-4a1a-95ff-e88547080602"],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"RE, RN, LE, LN FOC solutions: \"\>", "\[InvisibleSpace]", 
   RowBox[{"{", 
    RowBox[{"{", 
     RowBox[{"qre", "\[Rule]", 
      FractionBox[
       RowBox[{
        RowBox[{"-", "qle"}], "-", "qln", "+", "v", "+", 
        RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "+", "\[CapitalDelta]"}], 
       RowBox[{
        RowBox[{"-", "2"}], "+", 
        RowBox[{"4", " ", "\[Alpha]"}]}]]}], "}"}], "}"}], 
   "\[InvisibleSpace]", "\<\", \"\>", "\[InvisibleSpace]", 
   RowBox[{"{", 
    RowBox[{"{", 
     RowBox[{"qrn", "\[Rule]", 
      FractionBox[
       RowBox[{
        RowBox[{"-", "qle"}], "-", "qln", "+", "v", "+", 
        RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "+", "\[CapitalDelta]"}], 
       RowBox[{
        RowBox[{"-", "2"}], "+", 
        RowBox[{"4", " ", "\[Alpha]"}]}]]}], "}"}], "}"}], 
   "\[InvisibleSpace]", "\<\", \"\>", "\[InvisibleSpace]", 
   RowBox[{"{", 
    RowBox[{"{", 
     RowBox[{"qle", "\[Rule]", 
      FractionBox[
       RowBox[{
        RowBox[{"-", "qre"}], "-", "qrn", "+", "v", "-", 
        RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "+", "\[CapitalDelta]"}], 
       RowBox[{
        RowBox[{"-", "2"}], "+", 
        RowBox[{"4", " ", "\[Alpha]"}]}]]}], "}"}], "}"}], 
   "\[InvisibleSpace]", "\<\", \"\>", "\[InvisibleSpace]", 
   RowBox[{"{", 
    RowBox[{"{", 
     RowBox[{"qln", "\[Rule]", 
      FractionBox[
       RowBox[{
        RowBox[{"-", "qre"}], "-", "qrn", "+", "v", "-", 
        RowBox[{"2", " ", "xm"}], "+", "\[Alpha]", "+", "\[CapitalDelta]"}], 
       RowBox[{
        RowBox[{"-", "2"}], "+", 
        RowBox[{"4", " ", "\[Alpha]"}]}]]}], "}"}], "}"}]}],
  SequenceForm[
  "RE, RN, LE, LN FOC solutions: ", {{$CellContext`qre -> (-2 + 
        4 $CellContext`\[Alpha])^(-1) (-$CellContext`qle - $CellContext`qln + \
$CellContext`v + 
       2 $CellContext`xm + $CellContext`\[Alpha] + $CellContext`\
\[CapitalDelta])}}, 
   ", ", {{$CellContext`qrn -> (-2 + 
        4 $CellContext`\[Alpha])^(-1) (-$CellContext`qle - $CellContext`qln + \
$CellContext`v + 
       2 $CellContext`xm + $CellContext`\[Alpha] + $CellContext`\
\[CapitalDelta])}}, 
   ", ", {{$CellContext`qle -> (-2 + 
        4 $CellContext`\[Alpha])^(-1) (-$CellContext`qre - $CellContext`qrn + \
$CellContext`v - 
       2 $CellContext`xm + $CellContext`\[Alpha] + $CellContext`\
\[CapitalDelta])}}, 
   ", ", {{$CellContext`qln -> (-2 + 
        4 $CellContext`\[Alpha])^(-1) (-$CellContext`qre - $CellContext`qrn + \
$CellContext`v - 
       2 $CellContext`xm + $CellContext`\[Alpha] + $CellContext`\
\[CapitalDelta])}}],
  Editable->False]], "Print",
 CellChangeTimes->{
  3.763840553171976*^9, {3.7638426406136923`*^9, 3.7638426547936583`*^9}, 
   3.763923508664912*^9, 3.7639243271718807`*^9, 3.763934847713293*^9, 
   3.76393494923569*^9, 3.763935009163783*^9, 3.763935065833124*^9, 
   3.76393511399654*^9, 3.76393526166133*^9, 3.763935561078165*^9, 
   3.76394221150432*^9},
 CellLabel->
  "During evaluation of \
In[1]:=",ExpressionUUID->"122f5d7c-b004-47c5-94a4-8b83e227e5bb"]
}, Open  ]],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"qre", "\[Rule]", 
     FractionBox[
      RowBox[{
       RowBox[{"v", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}]}], "+", 
       SuperscriptBox["\[Alpha]", "2"], "-", "\[CapitalDelta]", "+", 
       RowBox[{"\[Alpha]", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "1"}], "+", 
          RowBox[{"2", " ", "xm"}], "+", "\[CapitalDelta]"}], ")"}]}]}], 
      RowBox[{"4", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], " ", "\[Alpha]"}]]}], 
    ",", 
    RowBox[{"qrn", "\[Rule]", 
     FractionBox[
      RowBox[{
       RowBox[{"v", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}]}], "+", 
       SuperscriptBox["\[Alpha]", "2"], "-", "\[CapitalDelta]", "+", 
       RowBox[{"\[Alpha]", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "1"}], "+", 
          RowBox[{"2", " ", "xm"}], "+", "\[CapitalDelta]"}], ")"}]}]}], 
      RowBox[{"4", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], " ", "\[Alpha]"}]]}], 
    ",", 
    RowBox[{"qle", "\[Rule]", 
     FractionBox[
      RowBox[{"v", "+", "\[Alpha]", "-", 
       RowBox[{"v", " ", "\[Alpha]"}], "+", 
       RowBox[{"2", " ", "xm", " ", "\[Alpha]"}], "-", 
       SuperscriptBox["\[Alpha]", "2"], "+", "\[CapitalDelta]", "-", 
       RowBox[{"\[Alpha]", " ", "\[CapitalDelta]"}]}], 
      RowBox[{
       RowBox[{"4", " ", "\[Alpha]"}], "-", 
       RowBox[{"4", " ", 
        SuperscriptBox["\[Alpha]", "2"]}]}]]}], ",", 
    RowBox[{"qln", "\[Rule]", 
     FractionBox[
      RowBox[{"v", "+", "\[Alpha]", "-", 
       RowBox[{"v", " ", "\[Alpha]"}], "+", 
       RowBox[{"2", " ", "xm", " ", "\[Alpha]"}], "-", 
       SuperscriptBox["\[Alpha]", "2"], "+", "\[CapitalDelta]", "-", 
       RowBox[{"\[Alpha]", " ", "\[CapitalDelta]"}]}], 
      RowBox[{
       RowBox[{"4", " ", "\[Alpha]"}], "-", 
       RowBox[{"4", " ", 
        SuperscriptBox["\[Alpha]", "2"]}]}]]}]}], "}"}], "}"}]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211511385*^9},
 CellLabel->"Out[86]=",ExpressionUUID->"95c9d51b-750f-48b7-b9c9-d6c124e14e7d"],

Cell[BoxData[
 InterpretationBox[Cell[
  "One Period Best Responses", "Subsubsection",ExpressionUUID->
   "f8c091f7-204b-4249-8ee2-7d839e9dc776"],
  TextCell["One Period Best Responses", "Subsubsection"]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211528016*^9},
 CellLabel->"Out[88]=",ExpressionUUID->"a632c8a0-f1af-40f9-badc-c3df5c9fddaf"],

Cell[BoxData[
 InterpretationBox[Cell[
  "In these expressions, > 0 means having primaries is better.", "Text",
   ExpressionUUID->"c21ca9b4-8ee2-4502-a532-f07e25b9836c"],
  TextCell[
  "In these expressions, > 0 means having primaries is better.", 
   "Text"]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.76394221153542*^9},
 CellLabel->"Out[89]=",ExpressionUUID->"70a8903d-9633-4c8f-8d5a-db19324d6187"],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"Party R: difference between expected utility between holding \
primaries and not, given L holds primaries (function \"\>", 
   "\[InvisibleSpace]", 
   StyleBox["\<\"RbrLprimary\"\>",
    StripOnInput->False,
    LineColor->RGBColor[0.5, 0, 0.5],
    FrontFaceColor->RGBColor[0.5, 0, 0.5],
    BackFaceColor->RGBColor[0.5, 0, 0.5],
    GraphicsColor->RGBColor[0.5, 0, 0.5],
    FontColor->RGBColor[0.5, 0, 0.5]], "\[InvisibleSpace]", "\<\"): \"\>"}],
  SequenceForm[
  "Party R: difference between expected utility between holding primaries and \
not, given L holds primaries (function ", 
   Style["RbrLprimary", 
    RGBColor[0.5, 0, 0.5]], "): "],
  Editable->False]], "Print",
 CellChangeTimes->{
  3.763840553171976*^9, {3.7638426406136923`*^9, 3.7638426547936583`*^9}, 
   3.763923508664912*^9, 3.7639243271718807`*^9, 3.763934847713293*^9, 
   3.76393494923569*^9, 3.763935009163783*^9, 3.763935065833124*^9, 
   3.76393511399654*^9, 3.76393526166133*^9, 3.763935561078165*^9, 
   3.763942211543272*^9},
 CellLabel->
  "During evaluation of \
In[1]:=",ExpressionUUID->"e67b8289-d991-4976-81aa-91f189be1bd8"],

Cell[BoxData[
 FractionBox[
  RowBox[{
   RowBox[{
    SuperscriptBox["b", "2"], " ", 
    RowBox[{"(", 
     RowBox[{"2", "-", 
      RowBox[{"3", " ", "\[Alpha]"}]}], ")"}]}], "-", 
   RowBox[{"16", " ", "v", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], " ", "\[Alpha]"}], "+", 
      RowBox[{"xm", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "1"}], "+", 
         RowBox[{"2", " ", "\[Alpha]"}]}], ")"}]}]}], ")"}]}], "+", 
   RowBox[{"4", " ", "b", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"xm", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "4"}], "+", 
         RowBox[{"6", " ", "\[Alpha]"}]}], ")"}]}], "+", 
      RowBox[{"v", " ", 
       RowBox[{"(", 
        RowBox[{"3", "-", 
         RowBox[{"7", " ", "\[Alpha]"}], "+", 
         RowBox[{"4", " ", 
          SuperscriptBox["\[Alpha]", "2"]}]}], ")"}]}], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "\[Alpha]"}], "-", 
         RowBox[{"3", " ", "\[CapitalDelta]"}], "+", 
         RowBox[{"4", " ", "\[Alpha]", " ", "\[CapitalDelta]"}]}], ")"}]}]}], 
     ")"}]}]}], 
  RowBox[{"64", " ", 
   SuperscriptBox[
    RowBox[{"(", 
     RowBox[{
      RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], "2"], " ", 
   "\[Alpha]"}]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.7639422115508413`*^9},
 CellLabel->"Out[91]=",ExpressionUUID->"c7da151b-1cfd-4603-9a72-2c4c568bbd85"],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"Party R: difference between expected utility between holding \
primaries and not, given L has no primary (function \"\>", 
   "\[InvisibleSpace]", 
   StyleBox["\<\"RbrLnoprimary\"\>",
    StripOnInput->False,
    LineColor->RGBColor[0.5, 0, 0.5],
    FrontFaceColor->RGBColor[0.5, 0, 0.5],
    BackFaceColor->RGBColor[0.5, 0, 0.5],
    GraphicsColor->RGBColor[0.5, 0, 0.5],
    FontColor->RGBColor[0.5, 0, 0.5]], "\[InvisibleSpace]", "\<\"): \"\>"}],
  SequenceForm[
  "Party R: difference between expected utility between holding primaries and \
not, given L has no primary (function ", 
   Style["RbrLnoprimary", 
    RGBColor[0.5, 0, 0.5]], "): "],
  Editable->False]], "Print",
 CellChangeTimes->{
  3.763840553171976*^9, {3.7638426406136923`*^9, 3.7638426547936583`*^9}, 
   3.763923508664912*^9, 3.7639243271718807`*^9, 3.763934847713293*^9, 
   3.76393494923569*^9, 3.763935009163783*^9, 3.763935065833124*^9, 
   3.76393511399654*^9, 3.76393526166133*^9, 3.763935561078165*^9, 
   3.763942211557094*^9},
 CellLabel->
  "During evaluation of \
In[1]:=",ExpressionUUID->"8ba57895-89d9-4dd0-a9d6-ab12c34715f9"],

Cell[BoxData[
 FractionBox[
  RowBox[{
   RowBox[{
    SuperscriptBox["b", "2"], " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"-", "2"}], "+", 
      RowBox[{"3", " ", "\[Alpha]"}]}], ")"}]}], "-", 
   RowBox[{"16", " ", "v", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], " ", "\[Alpha]"}], "+", 
      RowBox[{"xm", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "1"}], "+", 
         RowBox[{"2", " ", "\[Alpha]"}]}], ")"}]}]}], ")"}]}], "+", 
   RowBox[{"4", " ", "b", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"2", " ", "v", " ", 
       SuperscriptBox[
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], "2"]}], "+", 
      RowBox[{"xm", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "4"}], "+", 
         RowBox[{"6", " ", "\[Alpha]"}]}], ")"}]}], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "\[Alpha]"}], "-", 
         RowBox[{"3", " ", "\[CapitalDelta]"}], "+", 
         RowBox[{"4", " ", "\[Alpha]", " ", "\[CapitalDelta]"}]}], ")"}]}]}], 
     ")"}]}]}], 
  RowBox[{"64", " ", 
   SuperscriptBox[
    RowBox[{"(", 
     RowBox[{
      RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], "2"], " ", 
   "\[Alpha]"}]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211564478*^9},
 CellLabel->"Out[94]=",ExpressionUUID->"9f3faa34-90dc-486c-8653-615eadd3d598"],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"Party L: difference between expected utility between holding \
primaries and not, given R holds primaries (function \"\>", 
   "\[InvisibleSpace]", 
   StyleBox["\<\"LbrRprimary\"\>",
    StripOnInput->False,
    LineColor->RGBColor[0.5, 0, 0.5],
    FrontFaceColor->RGBColor[0.5, 0, 0.5],
    BackFaceColor->RGBColor[0.5, 0, 0.5],
    GraphicsColor->RGBColor[0.5, 0, 0.5],
    FontColor->RGBColor[0.5, 0, 0.5]], "\[InvisibleSpace]", "\<\"): \"\>"}],
  SequenceForm[
  "Party L: difference between expected utility between holding primaries and \
not, given R holds primaries (function ", 
   Style["LbrRprimary", 
    RGBColor[0.5, 0, 0.5]], "): "],
  Editable->False]], "Print",
 CellChangeTimes->{
  3.763840553171976*^9, {3.7638426406136923`*^9, 3.7638426547936583`*^9}, 
   3.763923508664912*^9, 3.7639243271718807`*^9, 3.763934847713293*^9, 
   3.76393494923569*^9, 3.763935009163783*^9, 3.763935065833124*^9, 
   3.76393511399654*^9, 3.76393526166133*^9, 3.763935561078165*^9, 
   3.763942211571795*^9},
 CellLabel->
  "During evaluation of \
In[1]:=",ExpressionUUID->"d18b8fe8-1c1a-4824-9a16-8b5a8e1131f8"],

Cell[BoxData[
 FractionBox[
  RowBox[{
   RowBox[{
    SuperscriptBox["b", "2"], " ", 
    RowBox[{"(", 
     RowBox[{"2", "-", 
      RowBox[{"3", " ", "\[Alpha]"}]}], ")"}]}], "-", 
   RowBox[{"16", " ", "v", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], " ", 
    RowBox[{"(", 
     RowBox[{"xm", "-", 
      RowBox[{"2", " ", "xm", " ", "\[Alpha]"}], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], " ", "\[Alpha]"}]}], 
     ")"}]}], "+", 
   RowBox[{"4", " ", "b", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"xm", " ", 
       RowBox[{"(", 
        RowBox[{"4", "-", 
         RowBox[{"6", " ", "\[Alpha]"}]}], ")"}]}], "+", 
      RowBox[{"v", " ", 
       RowBox[{"(", 
        RowBox[{"3", "-", 
         RowBox[{"7", " ", "\[Alpha]"}], "+", 
         RowBox[{"4", " ", 
          SuperscriptBox["\[Alpha]", "2"]}]}], ")"}]}], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "\[Alpha]"}], "-", 
         RowBox[{"3", " ", "\[CapitalDelta]"}], "+", 
         RowBox[{"4", " ", "\[Alpha]", " ", "\[CapitalDelta]"}]}], ")"}]}]}], 
     ")"}]}]}], 
  RowBox[{"64", " ", 
   SuperscriptBox[
    RowBox[{"(", 
     RowBox[{
      RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], "2"], " ", 
   "\[Alpha]"}]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211656357*^9},
 CellLabel->"Out[97]=",ExpressionUUID->"a6ee1c78-09ab-43a9-b07b-9d6c6730c689"],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"Party L: difference between expected utility between holding \
primaries and not, given R has no primary (function \"\>", 
   "\[InvisibleSpace]", 
   StyleBox["\<\"LbrRnoprimary\"\>",
    StripOnInput->False,
    LineColor->RGBColor[0.5, 0, 0.5],
    FrontFaceColor->RGBColor[0.5, 0, 0.5],
    BackFaceColor->RGBColor[0.5, 0, 0.5],
    GraphicsColor->RGBColor[0.5, 0, 0.5],
    FontColor->RGBColor[0.5, 0, 0.5]], "\[InvisibleSpace]", "\<\"): \"\>"}],
  SequenceForm[
  "Party L: difference between expected utility between holding primaries and \
not, given R has no primary (function ", 
   Style["LbrRnoprimary", 
    RGBColor[0.5, 0, 0.5]], "): "],
  Editable->False]], "Print",
 CellChangeTimes->{
  3.763840553171976*^9, {3.7638426406136923`*^9, 3.7638426547936583`*^9}, 
   3.763923508664912*^9, 3.7639243271718807`*^9, 3.763934847713293*^9, 
   3.76393494923569*^9, 3.763935009163783*^9, 3.763935065833124*^9, 
   3.76393511399654*^9, 3.76393526166133*^9, 3.763935561078165*^9, 
   3.76394221166467*^9},
 CellLabel->
  "During evaluation of \
In[1]:=",ExpressionUUID->"36c7e4f4-559d-43f7-8884-359fd0373512"],

Cell[BoxData[
 FractionBox[
  RowBox[{
   RowBox[{
    SuperscriptBox["b", "2"], " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"-", "2"}], "+", 
      RowBox[{"3", " ", "\[Alpha]"}]}], ")"}]}], "-", 
   RowBox[{"16", " ", "v", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], " ", 
    RowBox[{"(", 
     RowBox[{"xm", "-", 
      RowBox[{"2", " ", "xm", " ", "\[Alpha]"}], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], " ", "\[Alpha]"}]}], 
     ")"}]}], "+", 
   RowBox[{"4", " ", "b", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"xm", " ", 
       RowBox[{"(", 
        RowBox[{"4", "-", 
         RowBox[{"6", " ", "\[Alpha]"}]}], ")"}]}], "+", 
      RowBox[{"2", " ", "v", " ", 
       SuperscriptBox[
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], "2"]}], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "\[Alpha]"}], "-", 
         RowBox[{"3", " ", "\[CapitalDelta]"}], "+", 
         RowBox[{"4", " ", "\[Alpha]", " ", "\[CapitalDelta]"}]}], ")"}]}]}], 
     ")"}]}]}], 
  RowBox[{"64", " ", 
   SuperscriptBox[
    RowBox[{"(", 
     RowBox[{
      RowBox[{"-", "1"}], "+", "\[Alpha]"}], ")"}], "2"], " ", 
   "\[Alpha]"}]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211672029*^9},
 CellLabel->
  "Out[100]=",ExpressionUUID->"2b831b92-d0c4-46f8-9ac9-fd0dc4a834e2"],

Cell[BoxData[
 InterpretationBox[Cell[
  "Parametric assumptions for Markov Chain analysis", "Subsection",
   ExpressionUUID->"abf5e9ac-bbd6-42b8-b092-a07e1fd48437"],
  TextCell[
  "Parametric assumptions for Markov Chain analysis", 
   "Subsection"]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211678769*^9},
 CellLabel->
  "Out[102]=",ExpressionUUID->"edfdee22-88e9-4721-b5d1-7e11f8540f99"],

Cell[CellGroupData[{

Cell[BoxData[
 StyleBox["\<\"Parametric assumptions for simulation. For the results \
reported in the robustness analyses in the Appendix, reset the values of v, \
\[Alpha], and b as indicated.\"\>",
  StripOnInput->False,
  LineColor->RGBColor[1, 0, 0],
  FrontFaceColor->RGBColor[1, 0, 0],
  BackFaceColor->RGBColor[1, 0, 0],
  GraphicsColor->RGBColor[1, 0, 0],
  FontColor->RGBColor[1, 0, 0]]], "Print",
 CellChangeTimes->{
  3.763840553171976*^9, {3.7638426406136923`*^9, 3.7638426547936583`*^9}, 
   3.763923508664912*^9, 3.7639243271718807`*^9, 3.763934847713293*^9, 
   3.76393494923569*^9, 3.763935009163783*^9, 3.763935065833124*^9, 
   3.76393511399654*^9, 3.76393526166133*^9, 3.763935561078165*^9, 
   3.7639422116863194`*^9},
 CellLabel->
  "During evaluation of \
In[1]:=",ExpressionUUID->"d281ff26-45ec-470d-8acb-0a5ca716c096"],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"Throughout, make the following parametric assumptions: v = \
\"\>", "\[InvisibleSpace]", "0.5`", 
   "\[InvisibleSpace]", "\<\", \[Alpha] = \"\>", "\[InvisibleSpace]", "12", 
   "\[InvisibleSpace]", "\<\", b = \"\>", "\[InvisibleSpace]", "2.5`", 
   "\[InvisibleSpace]", "\<\".\"\>"}],
  SequenceForm[
  "Throughout, make the following parametric assumptions: v = ", 0.5, 
   ", \[Alpha] = ", 12, ", b = ", 2.5, "."],
  Editable->False]], "Print",
 CellChangeTimes->{
  3.763840553171976*^9, {3.7638426406136923`*^9, 3.7638426547936583`*^9}, 
   3.763923508664912*^9, 3.7639243271718807`*^9, 3.763934847713293*^9, 
   3.76393494923569*^9, 3.763935009163783*^9, 3.763935065833124*^9, 
   3.76393511399654*^9, 3.76393526166133*^9, 3.763935561078165*^9, 
   3.763942211693799*^9},
 CellLabel->
  "During evaluation of \
In[1]:=",ExpressionUUID->"2cb37cdd-253e-4cb2-8b05-375daf22a762"]
}, Open  ]],

Cell[BoxData[
 InterpretationBox[Cell[
  "Define probabilities of general election victory. ", "Subsection",
   ExpressionUUID->"2076407a-6ba5-4dd6-bdc0-ab3c03f307c5"],
  TextCell[
  "Define probabilities of general election victory. ", 
   "Subsection"]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211709882*^9},
 CellLabel->
  "Out[105]=",ExpressionUUID->"7406690a-3aa4-42ec-b96d-f6fed6be1946"],

Cell[CellGroupData[{

Cell[BoxData[
 StyleBox["\<\"\\nMarkov Chain analysis\"\>",
  StripOnInput->False,
  LineColor->RGBColor[1, 0, 0],
  FrontFaceColor->RGBColor[1, 0, 0],
  BackFaceColor->RGBColor[1, 0, 0],
  GraphicsColor->RGBColor[1, 0, 0],
  FontColor->RGBColor[1, 0, 0]]], "Print",
 CellChangeTimes->{
  3.763840553171976*^9, {3.7638426406136923`*^9, 3.7638426547936583`*^9}, 
   3.763923508664912*^9, 3.7639243271718807`*^9, 3.763934847713293*^9, 
   3.76393494923569*^9, 3.763935009163783*^9, 3.763935065833124*^9, 
   3.76393511399654*^9, 3.76393526166133*^9, 3.763935561078165*^9, 
   3.763942211725417*^9},
 CellLabel->
  "During evaluation of \
In[1]:=",ExpressionUUID->"50c200d5-7773-4de3-a417-775a2c4e7264"],

Cell[BoxData["\<\"States are of the form (w,p,c), where w \[Element] {l,m,h} \
is median voter this period, p \[Element] {l,r} is party of loser last \
period, and c \[Element] {e,p} is candidate selection mechanism of this \
period's incumbent (i.e. last period's winner, who can't change her \
mechanism.\"\>"], "Print",
 CellChangeTimes->{
  3.763840553171976*^9, {3.7638426406136923`*^9, 3.7638426547936583`*^9}, 
   3.763923508664912*^9, 3.7639243271718807`*^9, 3.763934847713293*^9, 
   3.76393494923569*^9, 3.763935009163783*^9, 3.763935065833124*^9, 
   3.76393511399654*^9, 3.76393526166133*^9, 3.763935561078165*^9, 
   3.76394221173239*^9},
 CellLabel->
  "During evaluation of \
In[1]:=",ExpressionUUID->"1b5112a9-15ef-4d2d-b758-f779d9d3b992"],

Cell[BoxData["\<\"Probability of ideological transition to another median is \
\[Delta], which is a measure of incumbency disadvantage\"\>"], "Print",
 CellChangeTimes->{
  3.763840553171976*^9, {3.7638426406136923`*^9, 3.7638426547936583`*^9}, 
   3.763923508664912*^9, 3.7639243271718807`*^9, 3.763934847713293*^9, 
   3.76393494923569*^9, 3.763935009163783*^9, 3.763935065833124*^9, 
   3.76393511399654*^9, 3.76393526166133*^9, 3.763935561078165*^9, 
   3.7639422117477703`*^9},
 CellLabel->
  "During evaluation of \
In[1]:=",ExpressionUUID->"0a85266f-655c-47d6-a494-29c196551345"]
}, Open  ]],

Cell[BoxData[
 InterpretationBox[Cell[
  "Load parameter sets for simulation.", "Subsection",ExpressionUUID->
   "e456aadd-c987-42b5-abf4-3180811dc218"],
  TextCell["Load parameter sets for simulation.", "Subsection"]]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211754343*^9},
 CellLabel->
  "Out[120]=",ExpressionUUID->"7eda215f-66d9-44f9-b564-36274ef47252"],

Cell[BoxData[
 StyleBox["\<\"Load parameter sets for use in the simulation. If an error \
occurs, your working directory is not set correctly. See Step 1 for more \
information.\"\>",
  StripOnInput->False,
  LineColor->RGBColor[1, 0, 0],
  FrontFaceColor->RGBColor[1, 0, 0],
  BackFaceColor->RGBColor[1, 0, 0],
  GraphicsColor->RGBColor[1, 0, 0],
  FontColor->RGBColor[1, 0, 0]]], "Print",
 CellChangeTimes->{
  3.763840553171976*^9, {3.7638426406136923`*^9, 3.7638426547936583`*^9}, 
   3.763923508664912*^9, 3.7639243271718807`*^9, 3.763934847713293*^9, 
   3.76393494923569*^9, 3.763935009163783*^9, 3.763935065833124*^9, 
   3.76393511399654*^9, 3.76393526166133*^9, 3.763935561078165*^9, 
   3.763942211769925*^9},
 CellLabel->
  "During evaluation of \
In[1]:=",ExpressionUUID->"0dbfb59b-5244-4df8-9b57-22ef1a6385f2"],

Cell[BoxData[
 TemplateBox[{
  "Import","nffil",
   "\"File not found during \\!\\(\\*RowBox[{\\\"Import\\\"}]\\).\"",2,122,2,
   23692548541274258860,"Local"},
  "MessageTemplate"]], "Message", "MSG",
 CellChangeTimes->{3.763942211776888*^9},
 CellLabel->
  "During evaluation of \
In[1]:=",ExpressionUUID->"ef4c6ddb-a927-4107-86f9-036b30f1803c"],

Cell[BoxData["$Failed"], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.7639422117947083`*^9},
 CellLabel->
  "Out[122]=",ExpressionUUID->"df6b987a-9543-44db-bc1d-f930b7d4f6df"],

Cell[BoxData[
 RowBox[{"{", "}"}]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.7639422118016977`*^9},
 CellLabel->
  "Out[123]=",ExpressionUUID->"a50418f1-33c5-4e5b-96fc-28b61aa1785b"],

Cell[BoxData[
 RowBox[{"$Failed", "[", "1", "]"}]], "Output",
 CellChangeTimes->{3.76392350864585*^9, 3.763924327151372*^9, 
  3.763934847414175*^9, 3.7639349491069*^9, 3.763935008976737*^9, 
  3.763935065616284*^9, 3.763935113862047*^9, 3.7639352615996857`*^9, 
  3.7639355609250603`*^9, 3.763942211808763*^9},
 CellLabel->
  "Out[124]=",ExpressionUUID->"9552c897-d6bb-4686-bde4-80867e0f0024"],

Cell[BoxData["\<\"Create vectors to hold simulation results.\"\>"], "Print",
 CellChangeTimes->{
  3.763840553171976*^9, {3.7638426406136923`*^9, 3.7638426547936583`*^9}, 
   3.763923508664912*^9, 3.7639243271718807`*^9, 3.763934847713293*^9, 
   3.76393494923569*^9, 3.763935009163783*^9, 3.763935065833124*^9, 
   3.76393511399654*^9, 3.76393526166133*^9, 3.763935561078165*^9, 
   3.763942211815742*^9},
 CellLabel->
  "During evaluation of \
In[1]:=",ExpressionUUID->"fbc279fa-5b73-429a-ae9f-368c4921f733"]
}, Open  ]],

Cell[BoxData[{
 RowBox[{Cell[
  "STEP 2: Run simulations", "Section",ExpressionUUID->
   "60811c5a-0094-4ce1-b46f-c10fe501a589"], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Print", "[", 
   RowBox[{"Style", "[", 
    RowBox[{
    "\"\<This for loop conducts the simulation over the matrix of parameter \
values. Warning: it takes several hours to evaluate on a laptop.\>\"", ",", 
     "Red"}], " ", "]"}], "]"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"For", "[", 
   RowBox[{
    RowBox[{"i", "=", "1"}], ",", 
    RowBox[{"i", "<", "87424"}], ",", 
    RowBox[{"i", "++"}], ",", 
    RowBox[{"{", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"Clear", "[", 
       RowBox[{
       "\[CapitalDelta]ex", ",", " ", "wex", ",", " ", "\[Delta]", ",", " ", 
        "\[CapitalDelta]", ",", " ", "np", ",", " ", "tp", ",", " ", "lp", 
        ",", " ", "rp", ",", " ", "w", ",", " ", "lLBR0", ",", " ", "lLBR1", 
        ",", " ", "mLBR0", ",", " ", "mLBR1", ",", " ", "hLBR0", ",", " ", 
        "hLBR1", ",", " ", "lRBR0", ",", " ", "lRBR1", ",", " ", "mRBR0", ",",
         " ", "mRBR1", ",", " ", "hRBR0", ",", " ", "hRBR1", ",", " ", 
        "lregen", ",", " ", "lrpgen", ",", " ", "llegen", ",", " ", "llpgen", 
        ",", " ", "mregen", ",", " ", "mrpgen", ",", "mlegen", ",", " ", 
        "mlpgen", ",", " ", "hregen", ",", " ", "hrpgen", ",", " ", "hlegen", 
        ",", " ", "hlpgen", ",", "\[IndentingNewLine]", "transmat0", ",", " ",
         "plle", ",", " ", "pllp", ",", " ", "plre", ",", " ", "plrp", ",", 
        " ", "pmle", ",", " ", "pmlp", ",", " ", "pmre", ",", " ", "pmrp", 
        ",", " ", "phle", ",", " ", "phlp", ",", " ", "phre", ",", " ", 
        "phrp", ",", " ", "ip", ",", " ", "cp"}], "]"}], ";", 
      "\[IndentingNewLine]", "\[IndentingNewLine]", 
      RowBox[{"(*", 
       RowBox[{
        RowBox[{
        "Note", " ", "that", " ", "\[CapitalDelta]ex", " ", "corresponds", 
         " ", "to", " ", "\[CapitalDelta]", " ", "in", " ", "the", " ", 
         RowBox[{"paper", ".", " ", "This"}], " ", "was", " ", 
         "parameterized", " ", "to", " ", "allow", " ", "flexibility", " ", 
         "in", " ", "generating", " ", "numeric", " ", 
         RowBox[{"outcomes", ".", " ", "For"}], " ", "the", " ", "purposes", 
         " ", "of", " ", "this", " ", "simulation"}], ",", " ", 
        RowBox[{
        "\[CapitalDelta]", " ", "and", " ", "\[CapitalDelta]ex", " ", "are", 
         " ", 
         RowBox[{"equivalent", "."}]}]}], "*)"}], "\[IndentingNewLine]", 
      RowBox[{"\[CapitalDelta]ex", " ", "=", " ", 
       RowBox[{
        RowBox[{"mat", "[", 
         RowBox[{"[", "i", "]"}], "]"}], "[", 
        RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"\[CapitalDelta]", " ", "=", " ", 
       RowBox[{
        RowBox[{"mat", "[", 
         RowBox[{"[", "i", "]"}], "]"}], "[", 
        RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"(*", 
       RowBox[{"Note", " ", "that", " ", "wex", " ", "is", " ", 
        RowBox[{"x_m", "^", "h"}], " ", "in", " ", "the", " ", "paper"}], " ",
        "*)"}], "\[IndentingNewLine]", 
      RowBox[{"wex", " ", "=", "  ", 
       RowBox[{
        RowBox[{"mat", "[", 
         RowBox[{"[", "i", "]"}], "]"}], "[", 
        RowBox[{"[", "2", "]"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"\[Delta]", " ", "=", "  ", 
       RowBox[{
        RowBox[{"mat", "[", 
         RowBox[{"[", "i", "]"}], "]"}], "[", 
        RowBox[{"[", "3", "]"}], "]"}]}], ";", "\[IndentingNewLine]", 
      "\[IndentingNewLine]", "\[IndentingNewLine]", 
      RowBox[{"(*", 
       RowBox[{"Print", "[", 
        RowBox[{"\"\<For example, let \[CapitalDelta] = \>\"", ",", " ", 
         RowBox[{"\[CapitalDelta]ex", " ", "=", " ", "2.3"}], ",", 
         "\"\< and xm =\>\"", ",", " ", 
         RowBox[{"xm", "=", "0"}], ",", "\"\<and |w| = \>\"", ",", 
         RowBox[{"wex", " ", "=", " ", "0.6"}]}], "]"}], "*)"}], 
      "\[IndentingNewLine]", "\[IndentingNewLine]", 
      RowBox[{"w", "=", 
       RowBox[{"xm", "-", "wex"}]}], ";", " ", 
      RowBox[{"(*", " ", 
       RowBox[{
       "set", " ", "the", " ", "median", " ", "voter", " ", "value", " ", 
        "for", " ", "each", " ", "type", " ", "of", " ", "election"}], " ", 
       "*)"}], "\[IndentingNewLine]", 
      RowBox[{"(*", 
       RowBox[{
        RowBox[{"Note", " ", ":", " ", 
         RowBox[{
         "will", " ", "need", " ", "the", " ", "BR", " ", "matrix", " ", "to",
           " ", "generate", " ", "a", " ", "series", " ", "of", " ", 
          RowBox[{"0", "/", "1"}], " ", "values"}]}], ",", " ", 
        RowBox[{"here", " ", "designated", " ", "_LBR0"}], ",", " ", "_LBR1", 
        ",", " ", "_RBR0", ",", " ", "_RBR1", ",", " ", 
        RowBox[{
        "to", " ", "determine", " ", "whether", " ", "the", " ", "choosing", 
         " ", "party", " ", "holds", " ", "a", " ", "primary", " ", 
         "conditional", " ", "on", " ", "the", " ", "other", " ", 
         RowBox[{"party", "'"}], "s", " ", "action", " ", "at", " ", "a", " ",
          "given", " ", "set", " ", "of", " ", "parameters", " ", "and", " ", 
         
         RowBox[{"w", ".", " ", "Values"}], " ", "should", " ", "be", " ", 
         "0", " ", "where", " ", "best", " ", "responses", " ", "are", " ", 
         "negative", " ", 
         RowBox[{"(", 
          RowBox[{"ie", " ", "no", " ", "primary"}], ")"}], " ", "and", " ", 
         "1", " ", "where", " ", "best", " ", "responses", " ", "are", " ", 
         "positive", " ", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"ie", " ", "primary"}], ")"}], "."}]}]}], "*)"}], 
      "\[IndentingNewLine]", "\[IndentingNewLine]", 
      RowBox[{"lLBR0", " ", ":=", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"LbrRnoprimary", "[", 
           RowBox[{
           "\[Rho]", ",", "\[Rho]l", ",", "\[Alpha]", ",", 
            "\[CapitalDelta]ex", ",", "b", ",", "v", ",", 
            RowBox[{"xm", "-", "wex"}]}], "]"}], ">", "0"}], ",", " ", "1", 
         ",", " ", "0"}], "]"}]}], ";", 
      RowBox[{"lLBR1", " ", ":=", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"LbrRprimary", "[", 
           RowBox[{
           "\[Rho]", ",", "\[Rho]", ",", "\[Alpha]", ",", "\[CapitalDelta]ex",
             ",", "b", ",", "v", ",", 
            RowBox[{"xm", "-", "wex"}]}], "]"}], ">", "0"}], ",", " ", "1", 
         ",", " ", "0"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"mLBR0", " ", ":=", " ", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"LbrRnoprimary", "[", 
           RowBox[{
           "\[Rho]", ",", "\[Rho]l", ",", "\[Alpha]", ",", 
            "\[CapitalDelta]ex", ",", "b", ",", "v", ",", "xm"}], "]"}], ">", 
          "0"}], ",", " ", "1", ",", " ", "0"}], "]"}]}], ";", 
      "\[IndentingNewLine]", 
      RowBox[{"mLBR1", " ", ":=", " ", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"LbrRprimary", "[", 
           RowBox[{
           "\[Rho]", ",", "\[Rho]", ",", "\[Alpha]", ",", "\[CapitalDelta]ex",
             ",", "b", ",", "v", ",", "xm"}], "]"}], ">", "0"}], ",", " ", 
         "1", ",", " ", "0"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"hLBR0", " ", ":=", " ", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"LbrRnoprimary", "[", 
           RowBox[{
           "\[Rho]", ",", "\[Rho]l", ",", "\[Alpha]", ",", 
            "\[CapitalDelta]ex", ",", "b", ",", "v", ",", 
            RowBox[{"xm", "+", "wex"}]}], "]"}], ">", "0"}], ",", " ", "1", 
         ",", " ", "0"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"hLBR1", " ", ":=", " ", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"LbrRprimary", "[", 
           RowBox[{
           "\[Rho]", ",", "\[Rho]", ",", "\[Alpha]", ",", "\[CapitalDelta]ex",
             ",", "b", ",", "v", ",", 
            RowBox[{"xm", "+", "wex"}]}], "]"}], ">", "0"}], ",", " ", "1", 
         ",", " ", "0"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"lRBR0", " ", ":=", " ", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"RbrLnoprimary", "[", 
           RowBox[{
           "\[Rho]", ",", "\[Rho]", ",", "\[Alpha]", ",", "\[CapitalDelta]ex",
             ",", "b", ",", "v", ",", 
            RowBox[{"xm", "-", "wex"}]}], "]"}], ">", "0"}], ",", " ", "1", 
         ",", " ", "0"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"lRBR1", " ", ":=", " ", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"RbrLprimary", "[", 
           RowBox[{
           "\[Rho]", ",", "\[Rho]l", ",", "\[Alpha]", ",", 
            "\[CapitalDelta]ex", ",", "b", ",", "v", ",", 
            RowBox[{"xm", "-", "wex"}]}], "]"}], ">", "0"}], ",", " ", "1", 
         ",", " ", "0"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"mRBR0", " ", ":=", " ", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"RbrLnoprimary", "[", 
           RowBox[{
           "\[Rho]", ",", "\[Rho]", ",", "\[Alpha]", ",", "\[CapitalDelta]ex",
             ",", "b", ",", "v", ",", "xm"}], "]"}], ">", "0"}], ",", " ", 
         "1", ",", " ", "0"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"mRBR1", " ", ":=", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"RbrLprimary", "[", 
           RowBox[{
           "\[Rho]", ",", "\[Rho]l", ",", "\[Alpha]", ",", 
            "\[CapitalDelta]ex", ",", "b", ",", "v", ",", "xm"}], "]"}], ">", 
          "0"}], ",", " ", "1", ",", " ", "0"}], "]"}]}], ";", 
      "\[IndentingNewLine]", 
      RowBox[{"hRBR0", " ", ":=", " ", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"RbrLnoprimary", "[", 
           RowBox[{
           "\[Rho]", ",", "\[Rho]", ",", "\[Alpha]", ",", "\[CapitalDelta]ex",
             ",", "b", ",", "v", ",", 
            RowBox[{"xm", "+", "wex"}]}], "]"}], ">", "0"}], ",", " ", "1", 
         ",", " ", "0"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"hRBR1", " ", ":=", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"RbrLprimary", "[", 
           RowBox[{
           "\[Rho]", ",", "\[Rho]l", ",", "\[Alpha]", ",", 
            "\[CapitalDelta]ex", ",", "b", ",", "v", ",", 
            RowBox[{"xm", "+", "wex"}]}], "]"}], ">", "0"}], ",", " ", "1", 
         ",", " ", "0"}], "]"}]}], ";", "\[IndentingNewLine]", 
      "\[IndentingNewLine]", "\[IndentingNewLine]", 
      RowBox[{"llegen", "=", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "lLBR0"}], ")"}], 
           RowBox[{"(", 
            RowBox[{"1", "-", 
             RowBox[{"2", "\[Delta]"}]}], ")"}], 
           RowBox[{"PrRwin0", "[", 
            RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], "+", 
          RowBox[{"lLBR0", 
           RowBox[{"(", 
            RowBox[{"1", "-", 
             RowBox[{"2", "\[Delta]"}]}], ")"}], 
           RowBox[{"PrRwinL", "[", 
            RowBox[{
            "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
            "]"}]}]}], ",", "0", ",", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "lLBR0"}], ")"}], 
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Delta]"}]}], ")"}], 
          RowBox[{"PrLwin0", "[", 
           RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], ",", 
         
         RowBox[{"lLBR0", 
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Delta]"}]}], ")"}], 
          RowBox[{"PrLwinL", "[", 
           RowBox[{
           "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
           "]"}]}], ",", "\[IndentingNewLine]", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "lLBR0"}], ")"}], "\[Delta]", " ", 
           RowBox[{"PrRwin0", "[", 
            RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], "+", 
          RowBox[{"lLBR0", " ", "\[Delta]", " ", 
           RowBox[{"PrRwinL", "[", 
            RowBox[{
            "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
            "]"}]}]}], ",", "0", ",", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "lLBR0"}], ")"}], "\[Delta]", " ", 
          RowBox[{"PrLwin0", "[", 
           RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], ",", 
         
         RowBox[{"lLBR0", " ", "\[Delta]", " ", 
          RowBox[{"PrLwinL", "[", 
           RowBox[{
           "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
           "]"}]}], ",", "\[IndentingNewLine]", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "lLBR0"}], ")"}], "\[Delta]", " ", 
           RowBox[{"PrRwin0", "[", 
            RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], "+", 
          RowBox[{"lLBR0", " ", "\[Delta]", " ", 
           RowBox[{"PrRwinL", "[", 
            RowBox[{
            "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
            "]"}]}]}], ",", "0", ",", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "lLBR0"}], ")"}], "\[Delta]", " ", 
          RowBox[{"PrLwin0", "[", 
           RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], ",", 
         
         RowBox[{"lLBR0", " ", "\[Delta]", " ", 
          RowBox[{"PrLwinL", "[", 
           RowBox[{
           "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
           "]"}]}]}], "\[IndentingNewLine]", "}"}]}], ";", 
      "\[IndentingNewLine]", 
      RowBox[{"llpgen", "=", 
       RowBox[{"{", 
        RowBox[{"0", ",", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "lLBR1"}], ")"}], 
           RowBox[{"(", 
            RowBox[{"1", "-", 
             RowBox[{"2", "\[Delta]"}]}], ")"}], 
           RowBox[{"PrRwinR", "[", 
            RowBox[{
            "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
            "]"}]}], " ", "+", " ", 
          RowBox[{"lLBR1", " ", 
           RowBox[{"(", 
            RowBox[{"1", "-", 
             RowBox[{"2", "\[Delta]"}]}], ")"}], " ", 
           RowBox[{"PrRwin2", "[", 
            RowBox[{
            "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
             "qR2primaryN", ",", "w"}], "]"}]}]}], ",", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "lLBR1"}], ")"}], 
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Delta]"}]}], ")"}], 
          RowBox[{"PrLwinR", "[", 
           RowBox[{
           "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
           "]"}]}], ",", "\[IndentingNewLine]", 
         RowBox[{"lLBR1", " ", 
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Delta]"}]}], ")"}], " ", 
          RowBox[{"PrLwin2", "[", 
           RowBox[{
           "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
            "qR2primaryN", ",", "w"}], "]"}]}], ",", "\[IndentingNewLine]", 
         "\[IndentingNewLine]", "0", ",", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "lLBR1"}], ")"}], "\[Delta]", " ", 
           RowBox[{"PrRwinR", "[", 
            RowBox[{
            "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
            "]"}]}], " ", "+", " ", 
          RowBox[{"lLBR1", " ", "\[Delta]", " ", 
           RowBox[{"PrRwin2", "[", 
            RowBox[{
            "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
             "qR2primaryN", ",", "w"}], "]"}]}]}], ",", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "lLBR1"}], ")"}], " ", "\[Delta]", " ", 
          RowBox[{"PrLwinR", "[", 
           RowBox[{
           "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
           "]"}]}], ",", "\[IndentingNewLine]", 
         RowBox[{"lLBR1", "  ", "\[Delta]", " ", 
          RowBox[{"PrLwin2", "[", 
           RowBox[{
           "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
            "qR2primaryN", ",", "w"}], "]"}]}], ",", "\[IndentingNewLine]", 
         "\[IndentingNewLine]", "0", ",", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "lLBR1"}], ")"}], "\[Delta]", " ", 
           RowBox[{"PrRwinR", "[", 
            RowBox[{
            "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
            "]"}]}], " ", "+", " ", 
          RowBox[{"lLBR1", " ", "\[Delta]", " ", 
           RowBox[{"PrRwin2", "[", 
            RowBox[{
            "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
             "qR2primaryN", ",", "w"}], "]"}]}]}], ",", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "lLBR1"}], ")"}], "\[Delta]", " ", 
          RowBox[{"PrLwinR", "[", 
           RowBox[{
           "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
           "]"}]}], ",", "\[IndentingNewLine]", 
         RowBox[{"lLBR1", " ", "\[Delta]", " ", 
          RowBox[{"PrLwin2", "[", 
           RowBox[{
           "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
            "qR2primaryN", ",", "w"}], "]"}]}]}], "\[IndentingNewLine]", 
        "}"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
      RowBox[{"lregen", "=", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "lRBR0"}], ")"}], 
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Delta]"}]}], ")"}], 
          RowBox[{"PrRwin0", "[", 
           RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], ",", 
         
         RowBox[{"lRBR0", 
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Delta]"}]}], ")"}], 
          RowBox[{"PrRwinR", "[", 
           RowBox[{
           "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
           "]"}]}], ",", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "lRBR0"}], ")"}], 
           RowBox[{"(", 
            RowBox[{"1", "-", 
             RowBox[{"2", "\[Delta]"}]}], ")"}], 
           RowBox[{"PrLwin0", "[", 
            RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], " ",
           "+", " ", 
          RowBox[{"lRBR0", 
           RowBox[{"(", 
            RowBox[{"1", "-", 
             RowBox[{"2", "\[Delta]"}]}], ")"}], 
           RowBox[{"PrLwinR", "[", 
            RowBox[{
            "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
            "]"}]}]}], ",", "0", ",", "\[IndentingNewLine]", 
         "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "lRBR0"}], ")"}], "\[Delta]", " ", 
          RowBox[{"PrRwin0", "[", 
           RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], ",", 
         
         RowBox[{"lRBR0", " ", "\[Delta]", " ", 
          RowBox[{"PrRwinR", "[", 
           RowBox[{
           "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
           "]"}]}], ",", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "lRBR0"}], ")"}], "\[Delta]", " ", 
           RowBox[{"PrLwin0", "[", 
            RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], " ",
           "+", " ", 
          RowBox[{"lRBR0", " ", "\[Delta]", " ", 
           RowBox[{"PrLwinR", "[", 
            RowBox[{
            "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
            "]"}]}]}], ",", "0", ",", "\[IndentingNewLine]", 
         "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "lRBR0"}], ")"}], "\[Delta]", " ", 
          RowBox[{"PrRwin0", "[", 
           RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], ",", 
         
         RowBox[{"lRBR0", " ", "\[Delta]", " ", 
          RowBox[{"PrRwinR", "[", 
           RowBox[{
           "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
           "]"}]}], ",", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "lRBR0"}], ")"}], "\[Delta]", " ", 
           RowBox[{"PrLwin0", "[", 
            RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], " ",
           "+", " ", 
          RowBox[{"lRBR0", " ", "\[Delta]", " ", 
           RowBox[{"PrLwinR", "[", 
            RowBox[{
            "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
            "]"}]}]}], ",", "0"}], "}"}]}], ";", "\[IndentingNewLine]", 
      "\[IndentingNewLine]", 
      RowBox[{"lrpgen", "=", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "lRBR1"}], ")"}], 
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Delta]"}]}], ")"}], 
          RowBox[{"PrRwinL", "[", 
           RowBox[{
           "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
           "]"}]}], ",", 
         RowBox[{"lRBR1", 
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Delta]"}]}], ")"}], 
          RowBox[{"PrRwin2", "[", 
           RowBox[{
           "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
            "qR2primaryN", ",", "w"}], "]"}]}], ",", " ", "0", ",", " ", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "lRBR1"}], ")"}], 
           RowBox[{"(", 
            RowBox[{"1", "-", 
             RowBox[{"2", "\[Delta]"}]}], ")"}], 
           RowBox[{"PrLwinL", "[", 
            RowBox[{
            "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
            "]"}]}], "+", " ", 
          RowBox[{"lRBR1", 
           RowBox[{"(", 
            RowBox[{"1", "-", 
             RowBox[{"2", "\[Delta]"}]}], ")"}], 
           RowBox[{"PrLwin2", "[", 
            RowBox[{
            "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
             "qR2primaryN", ",", "w"}], "]"}]}]}], ",", "\[IndentingNewLine]",
          "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "lRBR1"}], ")"}], "\[Delta]", " ", 
          RowBox[{"PrRwinL", "[", 
           RowBox[{
           "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
           "]"}]}], ",", 
         RowBox[{"lRBR1", " ", "\[Delta]", " ", 
          RowBox[{"PrRwin2", "[", 
           RowBox[{
           "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
            "qR2primaryN", ",", "w"}], "]"}]}], ",", " ", "0", ",", " ", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "lRBR1"}], ")"}], "\[Delta]", " ", 
           RowBox[{"PrLwinL", "[", 
            RowBox[{
            "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
            "]"}]}], "+", " ", 
          RowBox[{"lRBR1", " ", "\[Delta]", " ", 
           RowBox[{"PrLwin2", "[", 
            RowBox[{
            "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
             "qR2primaryN", ",", "w"}], "]"}]}]}], ",", "\[IndentingNewLine]",
          "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "lRBR1"}], ")"}], "\[Delta]", " ", 
          RowBox[{"PrRwinL", "[", 
           RowBox[{
           "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
           "]"}]}], ",", 
         RowBox[{"lRBR1", " ", "\[Delta]", " ", 
          RowBox[{"PrRwin2", "[", 
           RowBox[{
           "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
            "qR2primaryN", ",", "w"}], "]"}]}], ",", " ", "0", ",", " ", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "lRBR1"}], ")"}], "\[Delta]", " ", 
           RowBox[{"PrLwinL", "[", 
            RowBox[{
            "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
            "]"}]}], "+", " ", 
          RowBox[{"lRBR1", " ", "\[Delta]", " ", 
           RowBox[{"PrLwin2", "[", 
            RowBox[{
            "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
             "qR2primaryN", ",", "w"}], "]"}]}]}]}], "\[IndentingNewLine]", 
        "}"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"w", "=", "xm"}], ";", "\[IndentingNewLine]", 
      RowBox[{"mlegen", "=", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "mLBR0"}], ")"}], " ", "\[Delta]", " ", 
           RowBox[{"PrRwin0", "[", 
            RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], "+", 
          RowBox[{"mLBR0", " ", "\[Delta]", " ", 
           RowBox[{"PrRwinL", "[", 
            RowBox[{
            "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
            "]"}]}]}], ",", "0", ",", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "mLBR0"}], ")"}], " ", "\[Delta]", " ", 
          RowBox[{"PrLwin0", "[", 
           RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], ",", 
         
         RowBox[{"mLBR0", " ", "\[Delta]", " ", 
          RowBox[{"PrLwinL", "[", 
           RowBox[{
           "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
           "]"}]}], ",", "\[IndentingNewLine]", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "mLBR0"}], ")"}], 
           RowBox[{"(", 
            RowBox[{"1", "-", 
             RowBox[{"2", "\[Delta]"}]}], ")"}], " ", 
           RowBox[{"PrRwin0", "[", 
            RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], "+", 
          RowBox[{"mLBR0", " ", 
           RowBox[{"(", 
            RowBox[{"1", "-", 
             RowBox[{"2", "\[Delta]"}]}], ")"}], " ", 
           RowBox[{"PrRwinL", "[", 
            RowBox[{
            "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
            "]"}]}]}], ",", "0", ",", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "mLBR0"}], ")"}], 
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Delta]"}]}], ")"}], " ", 
          RowBox[{"PrLwin0", "[", 
           RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], ",", 
         
         RowBox[{"mLBR0", " ", 
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Delta]"}]}], ")"}], " ", 
          RowBox[{"PrLwinL", "[", 
           RowBox[{
           "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
           "]"}]}], ",", "\[IndentingNewLine]", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "mLBR0"}], ")"}], "\[Delta]", " ", 
           RowBox[{"PrRwin0", "[", 
            RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], "+", 
          RowBox[{"mLBR0", " ", "\[Delta]", " ", 
           RowBox[{"PrRwinL", "[", 
            RowBox[{
            "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
            "]"}]}]}], ",", "0", ",", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "mLBR0"}], ")"}], "\[Delta]", " ", 
          RowBox[{"PrLwin0", "[", 
           RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], ",", 
         
         RowBox[{"mLBR0", " ", "\[Delta]", " ", 
          RowBox[{"PrLwinL", "[", 
           RowBox[{
           "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
           "]"}]}]}], "\[IndentingNewLine]", "}"}]}], ";", 
      "\[IndentingNewLine]", 
      RowBox[{"mlpgen", "=", 
       RowBox[{"{", 
        RowBox[{"0", ",", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "mLBR1"}], ")"}], "\[Delta]", " ", 
           RowBox[{"PrRwinR", "[", 
            RowBox[{
            "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
            "]"}]}], " ", "+", " ", 
          RowBox[{"mLBR1", "  ", "\[Delta]", " ", 
           RowBox[{"PrRwin2", "[", 
            RowBox[{
            "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
             "qR2primaryN", ",", "w"}], "]"}]}]}], ",", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "mLBR1"}], ")"}], "\[Delta]", " ", 
          RowBox[{"PrLwinR", "[", 
           RowBox[{
           "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
           "]"}]}], ",", "\[IndentingNewLine]", 
         RowBox[{"mLBR1", " ", "\[Delta]", " ", 
          RowBox[{"PrLwin2", "[", 
           RowBox[{
           "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
            "qR2primaryN", ",", "w"}], "]"}]}], ",", "\[IndentingNewLine]", 
         "\[IndentingNewLine]", "0", ",", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "mLBR1"}], ")"}], 
           RowBox[{"(", 
            RowBox[{"1", "-", 
             RowBox[{"2", "\[Delta]"}]}], ")"}], " ", " ", 
           RowBox[{"PrRwinR", "[", 
            RowBox[{
            "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
            "]"}]}], " ", "+", " ", 
          RowBox[{"mLBR1", " ", 
           RowBox[{"(", 
            RowBox[{"1", "-", 
             RowBox[{"2", "\[Delta]"}]}], ")"}], " ", " ", 
           RowBox[{"PrRwin2", "[", 
            RowBox[{
            "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
             "qR2primaryN", ",", "w"}], "]"}]}]}], ",", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "mLBR1"}], ")"}], " ", 
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Delta]"}]}], ")"}], " ", " ", 
          RowBox[{"PrLwinR", "[", 
           RowBox[{
           "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
           "]"}]}], ",", "\[IndentingNewLine]", 
         RowBox[{"mLBR1", "  ", 
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Delta]"}]}], ")"}], " ", " ", 
          RowBox[{"PrLwin2", "[", 
           RowBox[{
           "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
            "qR2primaryN", ",", "w"}], "]"}]}], ",", "\[IndentingNewLine]", 
         "\[IndentingNewLine]", "0", ",", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "mLBR1"}], ")"}], "\[Delta]", " ", 
           RowBox[{"PrRwinR", "[", 
            RowBox[{
            "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
            "]"}]}], " ", "+", " ", 
          RowBox[{"mLBR1", " ", "\[Delta]", " ", 
           RowBox[{"PrRwin2", "[", 
            RowBox[{
            "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
             "qR2primaryN", ",", "w"}], "]"}]}]}], ",", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "mLBR1"}], ")"}], "\[Delta]", " ", 
          RowBox[{"PrLwinR", "[", 
           RowBox[{
           "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
           "]"}]}], ",", "\[IndentingNewLine]", 
         RowBox[{"mLBR1", " ", "\[Delta]", " ", 
          RowBox[{"PrLwin2", "[", 
           RowBox[{
           "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
            "qR2primaryN", ",", "w"}], "]"}]}]}], "\[IndentingNewLine]", 
        "}"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"mregen", "=", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "mRBR0"}], ")"}], "\[Delta]", " ", 
          RowBox[{"PrRwin0", "[", 
           RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], ",", 
         
         RowBox[{"mRBR0", " ", "\[Delta]", " ", 
          RowBox[{"PrRwinR", "[", 
           RowBox[{
           "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
           "]"}]}], ",", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "mRBR0"}], ")"}], "\[Delta]", " ", 
           RowBox[{"PrLwin0", "[", 
            RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], " ",
           "+", " ", 
          RowBox[{"mRBR0", " ", "\[Delta]", " ", 
           RowBox[{"PrLwinR", "[", 
            RowBox[{
            "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
            "]"}]}]}], ",", "0", ",", "\[IndentingNewLine]", 
         "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "mRBR0"}], ")"}], 
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Delta]"}]}], ")"}], " ", 
          RowBox[{"PrRwin0", "[", 
           RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], ",", 
         
         RowBox[{"mRBR0", " ", 
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Delta]"}]}], ")"}], " ", 
          RowBox[{"PrRwinR", "[", 
           RowBox[{
           "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
           "]"}]}], ",", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "mRBR0"}], ")"}], 
           RowBox[{"(", 
            RowBox[{"1", "-", 
             RowBox[{"2", "\[Delta]"}]}], ")"}], " ", 
           RowBox[{"PrLwin0", "[", 
            RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], " ",
           "+", " ", 
          RowBox[{"mRBR0", " ", 
           RowBox[{"(", 
            RowBox[{"1", "-", 
             RowBox[{"2", "\[Delta]"}]}], ")"}], " ", 
           RowBox[{"PrLwinR", "[", 
            RowBox[{
            "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
            "]"}]}]}], ",", "0", ",", "\[IndentingNewLine]", 
         "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "mRBR0"}], ")"}], "\[Delta]", " ", 
          RowBox[{"PrRwin0", "[", 
           RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], ",", 
         
         RowBox[{"mRBR0", " ", "\[Delta]", " ", 
          RowBox[{"PrRwinR", "[", 
           RowBox[{
           "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
           "]"}]}], ",", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "mRBR0"}], ")"}], "\[Delta]", " ", 
           RowBox[{"PrLwin0", "[", 
            RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], " ",
           "+", " ", 
          RowBox[{"mRBR0", " ", "\[Delta]", " ", 
           RowBox[{"PrLwinR", "[", 
            RowBox[{
            "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
            "]"}]}]}], ",", "0"}], "}"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"mrpgen", "=", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "mRBR1"}], ")"}], "\[Delta]", " ", 
          RowBox[{"PrRwinL", "[", 
           RowBox[{
           "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
           "]"}]}], ",", 
         RowBox[{"mRBR1", " ", "\[Delta]", " ", 
          RowBox[{"PrRwin2", "[", 
           RowBox[{
           "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
            "qR2primaryN", ",", "w"}], "]"}]}], ",", " ", "0", ",", " ", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "mRBR1"}], ")"}], "\[Delta]", " ", 
           RowBox[{"PrLwinL", "[", 
            RowBox[{
            "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
            "]"}]}], "+", " ", 
          RowBox[{"mRBR1", " ", "\[Delta]", " ", 
           RowBox[{"PrLwin2", "[", 
            RowBox[{
            "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
             "qR2primaryN", ",", "w"}], "]"}]}]}], ",", "\[IndentingNewLine]",
          "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "mRBR1"}], ")"}], 
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Delta]"}]}], ")"}], " ", 
          RowBox[{"PrRwinL", "[", 
           RowBox[{
           "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
           "]"}]}], ",", 
         RowBox[{"mRBR1", " ", 
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Delta]"}]}], ")"}], " ", 
          RowBox[{"PrRwin2", "[", 
           RowBox[{
           "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
            "qR2primaryN", ",", "w"}], "]"}]}], ",", " ", "0", ",", " ", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "mRBR1"}], ")"}], 
           RowBox[{"(", 
            RowBox[{"1", "-", 
             RowBox[{"2", "\[Delta]"}]}], ")"}], " ", 
           RowBox[{"PrLwinL", "[", 
            RowBox[{
            "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
            "]"}]}], "+", " ", 
          RowBox[{"mRBR1", " ", 
           RowBox[{"(", 
            RowBox[{"1", "-", 
             RowBox[{"2", "\[Delta]"}]}], ")"}], " ", 
           RowBox[{"PrLwin2", "[", 
            RowBox[{
            "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
             "qR2primaryN", ",", "w"}], "]"}]}]}], ",", "\[IndentingNewLine]",
          "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "mRBR1"}], ")"}], "\[Delta]", " ", 
          RowBox[{"PrRwinL", "[", 
           RowBox[{
           "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
           "]"}]}], ",", 
         RowBox[{"mRBR1", " ", "\[Delta]", " ", 
          RowBox[{"PrRwin2", "[", 
           RowBox[{
           "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
            "qR2primaryN", ",", "w"}], "]"}]}], ",", " ", "0", ",", " ", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "mRBR1"}], ")"}], "\[Delta]", " ", 
           RowBox[{"PrLwinL", "[", 
            RowBox[{
            "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
            "]"}]}], "+", " ", 
          RowBox[{"mRBR1", " ", "\[Delta]", " ", 
           RowBox[{"PrLwin2", "[", 
            RowBox[{
            "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
             "qR2primaryN", ",", "w"}], "]"}]}]}]}], "\[IndentingNewLine]", 
        "}"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"w", "=", 
       RowBox[{"xm", "+", "wex"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"hlegen", "=", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "hLBR0"}], ")"}], " ", "\[Delta]", " ", 
           RowBox[{"PrRwin0", "[", 
            RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], "+", 
          RowBox[{"hLBR0", " ", "\[Delta]", " ", 
           RowBox[{"PrRwinL", "[", 
            RowBox[{
            "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
            "]"}]}]}], ",", "0", ",", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "hLBR0"}], ")"}], " ", "\[Delta]", " ", 
          RowBox[{"PrLwin0", "[", 
           RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], ",", 
         
         RowBox[{"hLBR0", " ", "\[Delta]", " ", 
          RowBox[{"PrLwinL", "[", 
           RowBox[{
           "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
           "]"}]}], ",", "\[IndentingNewLine]", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "hLBR0"}], ")"}], "\[Delta]", " ", 
           RowBox[{"PrRwin0", "[", 
            RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], "+", 
          RowBox[{"hLBR0", " ", "\[Delta]", " ", 
           RowBox[{"PrRwinL", "[", 
            RowBox[{
            "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
            "]"}]}]}], ",", "0", ",", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "hLBR0"}], ")"}], "\[Delta]", " ", 
          RowBox[{"PrLwin0", "[", 
           RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], ",", 
         
         RowBox[{"hLBR0", " ", "\[Delta]", " ", 
          RowBox[{"PrLwinL", "[", 
           RowBox[{
           "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
           "]"}]}], ",", "\[IndentingNewLine]", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "hLBR0"}], ")"}], 
           RowBox[{"(", 
            RowBox[{"1", "-", 
             RowBox[{"2", "\[Delta]"}]}], ")"}], " ", 
           RowBox[{"PrRwin0", "[", 
            RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], "+", 
          RowBox[{"hLBR0", " ", 
           RowBox[{"(", 
            RowBox[{"1", "-", 
             RowBox[{"2", "\[Delta]"}]}], ")"}], " ", 
           RowBox[{"PrRwinL", "[", 
            RowBox[{
            "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
            "]"}]}]}], ",", "0", ",", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "hLBR0"}], ")"}], 
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Delta]"}]}], ")"}], " ", 
          RowBox[{"PrLwin0", "[", 
           RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], ",", 
         
         RowBox[{"hLBR0", " ", 
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Delta]"}]}], ")"}], " ", 
          RowBox[{"PrLwinL", "[", 
           RowBox[{
           "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
           "]"}]}]}], "\[IndentingNewLine]", "}"}]}], ";", 
      "\[IndentingNewLine]", 
      RowBox[{"hlpgen", "=", 
       RowBox[{"{", 
        RowBox[{"0", ",", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "hLBR1"}], ")"}], "\[Delta]", " ", 
           RowBox[{"PrRwinR", "[", 
            RowBox[{
            "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
            "]"}]}], " ", "+", " ", 
          RowBox[{"hLBR1", "  ", "\[Delta]", " ", 
           RowBox[{"PrRwin2", "[", 
            RowBox[{
            "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
             "qR2primaryN", ",", "w"}], "]"}]}]}], ",", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "hLBR1"}], ")"}], "\[Delta]", " ", 
          RowBox[{"PrLwinR", "[", 
           RowBox[{
           "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
           "]"}]}], ",", "\[IndentingNewLine]", 
         RowBox[{"hLBR1", " ", "\[Delta]", " ", 
          RowBox[{"PrLwin2", "[", 
           RowBox[{
           "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
            "qR2primaryN", ",", "w"}], "]"}]}], ",", "\[IndentingNewLine]", 
         "\[IndentingNewLine]", "0", ",", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "hLBR1"}], ")"}], "\[Delta]", "  ", 
           RowBox[{"PrRwinR", "[", 
            RowBox[{
            "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
            "]"}]}], " ", "+", " ", 
          RowBox[{"hLBR1", " ", "\[Delta]", " ", 
           RowBox[{"PrRwin2", "[", 
            RowBox[{
            "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
             "qR2primaryN", ",", "w"}], "]"}]}]}], ",", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "hLBR1"}], ")"}], " ", "\[Delta]", "  ", 
          RowBox[{"PrLwinR", "[", 
           RowBox[{
           "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
           "]"}]}], ",", "\[IndentingNewLine]", 
         RowBox[{"hLBR1", "  ", "\[Delta]", "  ", 
          RowBox[{"PrLwin2", "[", 
           RowBox[{
           "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
            "qR2primaryN", ",", "w"}], "]"}]}], ",", "\[IndentingNewLine]", 
         "\[IndentingNewLine]", "0", ",", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "hLBR1"}], ")"}], 
           RowBox[{"(", 
            RowBox[{"1", "-", 
             RowBox[{"2", "\[Delta]"}]}], ")"}], " ", 
           RowBox[{"PrRwinR", "[", 
            RowBox[{
            "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
            "]"}]}], " ", "+", " ", 
          RowBox[{"hLBR1", " ", 
           RowBox[{"(", 
            RowBox[{"1", "-", 
             RowBox[{"2", "\[Delta]"}]}], ")"}], " ", 
           RowBox[{"PrRwin2", "[", 
            RowBox[{
            "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
             "qR2primaryN", ",", "w"}], "]"}]}]}], ",", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "hLBR1"}], ")"}], 
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Delta]"}]}], ")"}], " ", 
          RowBox[{"PrLwinR", "[", 
           RowBox[{
           "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
           "]"}]}], ",", "\[IndentingNewLine]", 
         RowBox[{"hLBR1", " ", 
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Delta]"}]}], ")"}], " ", 
          RowBox[{"PrLwin2", "[", 
           RowBox[{
           "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
            "qR2primaryN", ",", "w"}], "]"}]}]}], "\[IndentingNewLine]", 
        "}"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"hregen", "=", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "hRBR0"}], ")"}], "\[Delta]", " ", 
          RowBox[{"PrRwin0", "[", 
           RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], ",", 
         
         RowBox[{"hRBR0", " ", "\[Delta]", " ", 
          RowBox[{"PrRwinR", "[", 
           RowBox[{
           "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
           "]"}]}], ",", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "hRBR0"}], ")"}], "\[Delta]", " ", 
           RowBox[{"PrLwin0", "[", 
            RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], " ",
           "+", " ", 
          RowBox[{"hRBR0", " ", "\[Delta]", " ", 
           RowBox[{"PrLwinR", "[", 
            RowBox[{
            "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
            "]"}]}]}], ",", "0", ",", "\[IndentingNewLine]", 
         "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "hRBR0"}], ")"}], "\[Delta]", " ", 
          RowBox[{"PrRwin0", "[", 
           RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], ",", 
         
         RowBox[{"hRBR0", "  ", "\[Delta]", " ", 
          RowBox[{"PrRwinR", "[", 
           RowBox[{
           "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
           "]"}]}], ",", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "hRBR0"}], ")"}], "\[Delta]", " ", 
           RowBox[{"PrLwin0", "[", 
            RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], " ",
           "+", " ", 
          RowBox[{"hRBR0", " ", "\[Delta]", " ", 
           RowBox[{"PrLwinR", "[", 
            RowBox[{
            "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
            "]"}]}]}], ",", "0", ",", "\[IndentingNewLine]", 
         "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "hRBR0"}], ")"}], 
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Delta]"}]}], ")"}], " ", " ", 
          RowBox[{"PrRwin0", "[", 
           RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], ",", 
         
         RowBox[{"hRBR0", " ", 
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Delta]"}]}], ")"}], " ", " ", 
          RowBox[{"PrRwinR", "[", 
           RowBox[{
           "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
           "]"}]}], ",", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "hRBR0"}], ")"}], 
           RowBox[{"(", 
            RowBox[{"1", "-", 
             RowBox[{"2", "\[Delta]"}]}], ")"}], " ", " ", 
           RowBox[{"PrLwin0", "[", 
            RowBox[{"qL0primary", ",", "qR0primary", ",", "w"}], "]"}]}], " ",
           "+", " ", 
          RowBox[{"hRBR0", " ", 
           RowBox[{"(", 
            RowBox[{"1", "-", 
             RowBox[{"2", "\[Delta]"}]}], ")"}], " ", " ", 
           RowBox[{"PrLwinR", "[", 
            RowBox[{
            "qLRprimary", ",", "qRRprimaryE", ",", "qRRprimaryN", ",", "w"}], 
            "]"}]}]}], ",", "0"}], "}"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"hrpgen", "=", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "hRBR1"}], ")"}], "\[Delta]", " ", 
          RowBox[{"PrRwinL", "[", 
           RowBox[{
           "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
           "]"}]}], ",", 
         RowBox[{"hRBR1", " ", "\[Delta]", " ", 
          RowBox[{"PrRwin2", "[", 
           RowBox[{
           "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
            "qR2primaryN", ",", "w"}], "]"}]}], ",", " ", "0", ",", " ", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "hRBR1"}], ")"}], "\[Delta]", " ", 
           RowBox[{"PrLwinL", "[", 
            RowBox[{
            "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
            "]"}]}], "+", " ", 
          RowBox[{"hRBR1", " ", "\[Delta]", " ", 
           RowBox[{"PrLwin2", "[", 
            RowBox[{
            "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
             "qR2primaryN", ",", "w"}], "]"}]}]}], ",", "\[IndentingNewLine]",
          "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "hRBR1"}], ")"}], "\[Delta]", " ", 
          RowBox[{"PrRwinL", "[", 
           RowBox[{
           "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
           "]"}]}], ",", 
         RowBox[{"hRBR1", " ", "\[Delta]", " ", 
          RowBox[{"PrRwin2", "[", 
           RowBox[{
           "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
            "qR2primaryN", ",", "w"}], "]"}]}], ",", " ", "0", ",", " ", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "hRBR1"}], ")"}], "\[Delta]", " ", 
           RowBox[{"PrLwinL", "[", 
            RowBox[{
            "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
            "]"}]}], "+", " ", 
          RowBox[{"hRBR1", " ", "\[Delta]", " ", 
           RowBox[{"PrLwin2", "[", 
            RowBox[{
            "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
             "qR2primaryN", ",", "w"}], "]"}]}]}], ",", "\[IndentingNewLine]",
          "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "-", "hRBR1"}], ")"}], 
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Delta]"}]}], ")"}], " ", 
          RowBox[{"PrRwinL", "[", 
           RowBox[{
           "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
           "]"}]}], ",", 
         RowBox[{"hRBR1", " ", 
          RowBox[{"(", 
           RowBox[{"1", "-", 
            RowBox[{"2", "\[Delta]"}]}], ")"}], " ", 
          RowBox[{"PrRwin2", "[", 
           RowBox[{
           "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
            "qR2primaryN", ",", "w"}], "]"}]}], ",", " ", "0", ",", " ", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "-", "hRBR1"}], ")"}], 
           RowBox[{"(", 
            RowBox[{"1", "-", 
             RowBox[{"2", "\[Delta]"}]}], ")"}], " ", 
           RowBox[{"PrLwinL", "[", 
            RowBox[{
            "qLLprimaryE", ",", "qLLprimaryN", ",", "qRLprimary", ",", "w"}], 
            "]"}]}], "+", " ", 
          RowBox[{"hRBR1", " ", 
           RowBox[{"(", 
            RowBox[{"1", "-", 
             RowBox[{"2", "\[Delta]"}]}], ")"}], " ", 
           RowBox[{"PrLwin2", "[", 
            RowBox[{
            "qL2primaryE", ",", "qL2primaryN", ",", "qR2primaryE", ",", 
             "qR2primaryN", ",", "w"}], "]"}]}]}]}], "\[IndentingNewLine]", 
        "}"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
      "\[IndentingNewLine]", "\[IndentingNewLine]", 
      RowBox[{"transmat0", "=", 
       RowBox[{"{", 
        RowBox[{
        "llegen", ",", "llpgen", ",", "lregen", ",", "lrpgen", ",", "mlegen", 
         ",", "mlpgen", ",", "mregen", ",", "mrpgen", ",", "hlegen", ",", 
         "hlpgen", ",", "hregen", ",", "hrpgen"}], "}"}]}], ";", 
      "\[IndentingNewLine]", "\[IndentingNewLine]", 
      RowBox[{"\[ScriptCapitalP]", "=", 
       RowBox[{"DiscreteMarkovProcess", "[", 
        RowBox[{"1", ",", " ", 
         RowBox[{"Simplify", "[", "transmat0", "]"}]}], "]"}]}], ";", 
      "\[IndentingNewLine]", "\[IndentingNewLine]", 
      RowBox[{"plle", "=", 
       RowBox[{"PDF", "[", 
        RowBox[{
         RowBox[{"StationaryDistribution", "[", "\[ScriptCapitalP]", "]"}], 
         ",", "1"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"pllp", "=", 
       RowBox[{"PDF", "[", 
        RowBox[{
         RowBox[{"StationaryDistribution", "[", "\[ScriptCapitalP]", "]"}], 
         ",", "2"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"plre", "=", 
       RowBox[{"PDF", "[", 
        RowBox[{
         RowBox[{"StationaryDistribution", "[", "\[ScriptCapitalP]", "]"}], 
         ",", "3"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"plrp", "=", 
       RowBox[{"PDF", "[", 
        RowBox[{
         RowBox[{"StationaryDistribution", "[", "\[ScriptCapitalP]", "]"}], 
         ",", "4"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"pmle", "=", 
       RowBox[{"PDF", "[", 
        RowBox[{
         RowBox[{"StationaryDistribution", "[", "\[ScriptCapitalP]", "]"}], 
         ",", "5"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"pmlp", "=", 
       RowBox[{"PDF", "[", 
        RowBox[{
         RowBox[{"StationaryDistribution", "[", "\[ScriptCapitalP]", "]"}], 
         ",", "6"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"pmre", "=", 
       RowBox[{"PDF", "[", 
        RowBox[{
         RowBox[{"StationaryDistribution", "[", "\[ScriptCapitalP]", "]"}], 
         ",", "7"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"pmrp", "=", " ", 
       RowBox[{"PDF", "[", 
        RowBox[{
         RowBox[{"StationaryDistribution", "[", "\[ScriptCapitalP]", "]"}], 
         ",", "8"}], "]"}]}], ";", "\n", "     ", 
      RowBox[{"phle", "=", 
       RowBox[{"PDF", "[", 
        RowBox[{
         RowBox[{"StationaryDistribution", "[", "\[ScriptCapitalP]", "]"}], 
         ",", "9"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"phlp", "=", 
       RowBox[{"PDF", "[", 
        RowBox[{
         RowBox[{"StationaryDistribution", "[", "\[ScriptCapitalP]", "]"}], 
         ",", "10"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"phre", "=", 
       RowBox[{"PDF", "[", 
        RowBox[{
         RowBox[{"StationaryDistribution", "[", "\[ScriptCapitalP]", "]"}], 
         ",", "11"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"phrp", "=", " ", 
       RowBox[{"PDF", "[", 
        RowBox[{
         RowBox[{"StationaryDistribution", "[", "\[ScriptCapitalP]", "]"}], 
         ",", "12"}], "]"}]}], ";", "\[IndentingNewLine]", "\n", "     ", 
      RowBox[{"np", "=", " ", 
       RowBox[{
        RowBox[{"plle", " ", "*", 
         RowBox[{"(", 
          RowBox[{"1", "-", "lLBR0"}], ")"}]}], "+", 
        RowBox[{"phre", "*", 
         RowBox[{"(", 
          RowBox[{"1", "-", "hRBR0"}], ")"}]}], " ", "+", " ", 
        RowBox[{"pmle", " ", "*", 
         RowBox[{"(", 
          RowBox[{"1", "-", "mLBR0"}], ")"}]}], "+", " ", 
        RowBox[{"phle", " ", "*", 
         RowBox[{"(", 
          RowBox[{"1", "-", "hLBR0"}], ")"}]}], "+", " ", 
        RowBox[{"plre", " ", "*", 
         RowBox[{"(", 
          RowBox[{"1", "-", "lRBR0"}], ")"}]}], "+", " ", 
        RowBox[{"pmre", "*", 
         RowBox[{"(", 
          RowBox[{"1", "-", "mRBR0"}], ")"}]}]}]}], ";", 
      "\[IndentingNewLine]", 
      RowBox[{"lp", "=", 
       RowBox[{
        RowBox[{"plle", " ", "*", 
         RowBox[{"(", "lLBR0", ")"}]}], " ", "+", " ", 
        RowBox[{"pmle", " ", "*", 
         RowBox[{"(", "mLBR0", ")"}]}], "+", " ", 
        RowBox[{"phle", " ", "*", 
         RowBox[{"(", "hLBR0", ")"}]}], "+", " ", 
        RowBox[{"plrp", " ", "*", 
         RowBox[{"(", 
          RowBox[{"1", "-", "lRBR1"}], ")"}]}], "+", " ", 
        RowBox[{"pmrp", "*", 
         RowBox[{"(", 
          RowBox[{"1", "-", "mRBR1"}], ")"}]}], "+", 
        RowBox[{"phrp", "*", 
         RowBox[{"(", 
          RowBox[{"1", "-", "hRBR1"}], ")"}]}]}]}], ";", 
      "\[IndentingNewLine]", 
      RowBox[{"rp", "=", 
       RowBox[{
        RowBox[{"plre", " ", "*", 
         RowBox[{"(", "lRBR0", ")"}]}], "+", " ", 
        RowBox[{"pmre", "*", 
         RowBox[{"(", "mRBR0", ")"}]}], "+", 
        RowBox[{"phre", "*", 
         RowBox[{"(", "hRBR0", ")"}]}], "+", 
        RowBox[{"pllp", "*", 
         RowBox[{"(", 
          RowBox[{"1", "-", "lLBR1"}], ")"}]}], "+", 
        RowBox[{"pmlp", "*", 
         RowBox[{"(", 
          RowBox[{"1", "-", "mLBR1"}], ")"}]}], "+", 
        RowBox[{"phlp", "*", 
         RowBox[{"(", 
          RowBox[{"1", "-", "hLBR1"}], ")"}]}]}]}], ";", 
      "\[IndentingNewLine]", 
      RowBox[{"tp", " ", "=", 
       RowBox[{
        RowBox[{"plrp", "*", 
         RowBox[{"(", "lRBR1", ")"}]}], "+", 
        RowBox[{"pmlp", "*", 
         RowBox[{"(", "mLBR1", ")"}]}], "+", 
        RowBox[{"pmrp", "*", 
         RowBox[{"(", "mRBR1", ")"}]}], "+", 
        RowBox[{"phlp", "*", 
         RowBox[{"(", "hLBR1", ")"}]}], " ", "+", " ", 
        RowBox[{"pllp", "*", 
         RowBox[{"(", "lLBR1", ")"}]}], " ", "+", " ", 
        RowBox[{"phrp", "*", 
         RowBox[{"(", "hRBR1", ")"}]}]}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"cp", "=", 
       RowBox[{
        RowBox[{"plle", " ", "*", 
         RowBox[{"(", "lLBR0", ")"}]}], " ", "+", " ", 
        RowBox[{"pmle", " ", "*", 
         RowBox[{"(", "mLBR0", ")"}]}], "+", " ", 
        RowBox[{"phle", " ", "*", 
         RowBox[{"(", "hLBR0", ")"}]}], "+", 
        RowBox[{"plre", " ", "*", 
         RowBox[{"(", "lRBR0", ")"}]}], "+", " ", 
        RowBox[{"pmre", "*", 
         RowBox[{"(", "mRBR0", ")"}]}], "+", 
        RowBox[{"phre", "*", 
         RowBox[{"(", "hRBR0", ")"}]}], "+", "\[IndentingNewLine]", 
        RowBox[{"plrp", "*", 
         RowBox[{"(", "lRBR1", ")"}]}], "+", 
        RowBox[{"pmlp", "*", 
         RowBox[{"(", "mLBR1", ")"}]}], "+", 
        RowBox[{"pmrp", "*", 
         RowBox[{"(", "mRBR1", ")"}]}], "+", 
        RowBox[{"phlp", "*", 
         RowBox[{"(", "hLBR1", ")"}]}], " ", "+", " ", 
        RowBox[{"pllp", "*", 
         RowBox[{"(", "lLBR1", ")"}]}], " ", "+", " ", 
        RowBox[{"phrp", "*", 
         RowBox[{"(", "hRBR1", ")"}]}]}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"ip", "=", 
       RowBox[{
        RowBox[{"plrp", " ", "*", 
         RowBox[{"(", 
          RowBox[{"1", "-", "lRBR1"}], ")"}]}], "+", " ", 
        RowBox[{"pmrp", "*", 
         RowBox[{"(", 
          RowBox[{"1", "-", "mRBR1"}], ")"}]}], "+", 
        RowBox[{"phrp", "*", 
         RowBox[{"(", 
          RowBox[{"1", "-", "hRBR1"}], ")"}]}], "+", 
        RowBox[{"pllp", "*", 
         RowBox[{"(", 
          RowBox[{"1", "-", "lLBR1"}], ")"}]}], "+", 
        RowBox[{"pmlp", "*", 
         RowBox[{"(", 
          RowBox[{"1", "-", "mLBR1"}], ")"}]}], "+", 
        RowBox[{"phlp", "*", 
         RowBox[{"(", 
          RowBox[{"1", "-", "hLBR1"}], ")"}]}], "+", 
        RowBox[{"plrp", "*", 
         RowBox[{"(", "lRBR1", ")"}]}], "+", 
        RowBox[{"pmlp", "*", 
         RowBox[{"(", "mLBR1", ")"}]}], "+", 
        RowBox[{"pmrp", "*", 
         RowBox[{"(", "mRBR1", ")"}]}], "+", 
        RowBox[{"phlp", "*", 
         RowBox[{"(", "hLBR1", ")"}]}], " ", "+", " ", 
        RowBox[{"pllp", "*", 
         RowBox[{"(", "lLBR1", ")"}]}], " ", "+", " ", 
        RowBox[{"phrp", "*", 
         RowBox[{"(", "hRBR1", ")"}]}]}]}], ";", "\[IndentingNewLine]", 
      "\[IndentingNewLine]", "\[IndentingNewLine]", 
      RowBox[{
       RowBox[{"noprimaries", "[", 
        RowBox[{"[", "i", "]"}], "]"}], "=", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{
          RowBox[{
           RowBox[{"LbrRprimary", "[", 
            RowBox[{
            "\[Rho]", ",", "\[Rho]", ",", "\[Alpha]", ",", "\[CapitalDelta]", 
             ",", "b", ",", "v", ",", 
             RowBox[{"xm", "+", "wex"}]}], "]"}], ">", "0"}], " ", "&&", 
          RowBox[{
           RowBox[{"RbrLprimary", "[", 
            RowBox[{
            "\[Rho]", ",", "\[Rho]", ",", "\[Alpha]", ",", "\[CapitalDelta]", 
             ",", "b", ",", "v", ",", 
             RowBox[{"xm", "+", "wex"}]}], "]"}], ">", "0"}], " ", "&&", 
          RowBox[{
           RowBox[{"LbrRnoprimary", "[", 
            RowBox[{
            "\[Rho]", ",", "\[Rho]", ",", "\[Alpha]", ",", "\[CapitalDelta]", 
             ",", "b", ",", "v", ",", 
             RowBox[{"xm", "+", "wex"}]}], "]"}], "<", "0"}], " ", "&&", 
          RowBox[{
           RowBox[{"RbrLnoprimary", "[", 
            RowBox[{
            "\[Rho]", ",", "\[Rho]", ",", "\[Alpha]", ",", "\[CapitalDelta]", 
             ",", "b", ",", "v", ",", 
             RowBox[{"xm", "+", "wex"}]}], "]"}], "<", "0"}]}], ",", " ", "2",
          ",", "np"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{
       RowBox[{"twoprimaries", "[", 
        RowBox[{"[", "i", "]"}], "]"}], "=", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{
          RowBox[{
           RowBox[{"LbrRprimary", "[", 
            RowBox[{
            "\[Rho]", ",", "\[Rho]", ",", "\[Alpha]", ",", "\[CapitalDelta]", 
             ",", "b", ",", "v", ",", 
             RowBox[{"xm", "+", "wex"}]}], "]"}], ">", "0"}], " ", "&&", 
          RowBox[{
           RowBox[{"RbrLprimary", "[", 
            RowBox[{
            "\[Rho]", ",", "\[Rho]", ",", "\[Alpha]", ",", "\[CapitalDelta]", 
             ",", "b", ",", "v", ",", 
             RowBox[{"xm", "+", "wex"}]}], "]"}], ">", "0"}], " ", "&&", 
          RowBox[{
           RowBox[{"LbrRnoprimary", "[", 
            RowBox[{
            "\[Rho]", ",", "\[Rho]", ",", "\[Alpha]", ",", "\[CapitalDelta]", 
             ",", "b", ",", "v", ",", 
             RowBox[{"xm", "+", "wex"}]}], "]"}], "<", "0"}], " ", "&&", 
          RowBox[{
           RowBox[{"RbrLnoprimary", "[", 
            RowBox[{
            "\[Rho]", ",", "\[Rho]", ",", "\[Alpha]", ",", "\[CapitalDelta]", 
             ",", "b", ",", "v", ",", 
             RowBox[{"xm", "+", "wex"}]}], "]"}], "<", "0"}]}], ",", " ", "2",
          ",", " ", "tp"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{
       RowBox[{"Rprimary", "[", 
        RowBox[{"[", "i", "]"}], "]"}], "=", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{
          RowBox[{
           RowBox[{"LbrRprimary", "[", 
            RowBox[{
            "\[Rho]", ",", "\[Rho]", ",", "\[Alpha]", ",", "\[CapitalDelta]", 
             ",", "b", ",", "v", ",", 
             RowBox[{"xm", "+", "wex"}]}], "]"}], ">", "0"}], " ", "&&", 
          RowBox[{
           RowBox[{"RbrLprimary", "[", 
            RowBox[{
            "\[Rho]", ",", "\[Rho]", ",", "\[Alpha]", ",", "\[CapitalDelta]", 
             ",", "b", ",", "v", ",", 
             RowBox[{"xm", "+", "wex"}]}], "]"}], ">", "0"}], " ", "&&", " ", 
          
          RowBox[{
           RowBox[{"LbrRnoprimary", "[", 
            RowBox[{
            "\[Rho]", ",", "\[Rho]", ",", "\[Alpha]", ",", "\[CapitalDelta]", 
             ",", "b", ",", "v", ",", 
             RowBox[{"xm", "+", "wex"}]}], "]"}], "<", "0"}], " ", "&&", 
          RowBox[{
           RowBox[{"RbrLnoprimary", "[", 
            RowBox[{
            "\[Rho]", ",", "\[Rho]", ",", "\[Alpha]", ",", "\[CapitalDelta]", 
             ",", "b", ",", "v", ",", 
             RowBox[{"xm", "+", "wex"}]}], "]"}], "<", "0"}]}], ",", " ", "2",
          ",", " ", "rp"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{
       RowBox[{"Lprimary", "[", 
        RowBox[{"[", "i", "]"}], "]"}], "=", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{
          RowBox[{
           RowBox[{"LbrRprimary", "[", 
            RowBox[{
            "\[Rho]", ",", "\[Rho]", ",", "\[Alpha]", ",", "\[CapitalDelta]", 
             ",", "b", ",", "v", ",", 
             RowBox[{"xm", "+", "wex"}]}], "]"}], ">", "0"}], " ", "&&", 
          RowBox[{
           RowBox[{"RbrLprimary", "[", 
            RowBox[{
            "\[Rho]", ",", "\[Rho]", ",", "\[Alpha]", ",", "\[CapitalDelta]", 
             ",", "b", ",", "v", ",", 
             RowBox[{"xm", "+", "wex"}]}], "]"}], ">", "0"}], " ", "&&", " ", 
          
          RowBox[{
           RowBox[{"LbrRnoprimary", "[", 
            RowBox[{
            "\[Rho]", ",", "\[Rho]", ",", "\[Alpha]", ",", "\[CapitalDelta]", 
             ",", "b", ",", "v", ",", 
             RowBox[{"xm", "+", "wex"}]}], "]"}], "<", "0"}], " ", "&&", 
          RowBox[{
           RowBox[{"RbrLnoprimary", "[", 
            RowBox[{
            "\[Rho]", ",", "\[Rho]", ",", "\[Alpha]", ",", "\[CapitalDelta]", 
             ",", "b", ",", "v", ",", 
             RowBox[{"xm", "+", "wex"}]}], "]"}], "<", "0"}]}], ",", " ", "2",
          ",", " ", "lp"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{
       RowBox[{"chalprimary", "[", 
        RowBox[{"[", "i", "]"}], "]"}], " ", "=", " ", "cp"}], ";", 
      "\[IndentingNewLine]", 
      RowBox[{
       RowBox[{"incprimary", "[", 
        RowBox[{"[", "i", "]"}], "]"}], " ", "=", " ", "ip"}], ";"}], 
     "\[IndentingNewLine]", "}"}]}], "]"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", Cell["Export the output of \
the simulation", "Subsection",ExpressionUUID->
  "75584b95-f6a8-4f3e-aa28-c4b4613467d6"], "\[IndentingNewLine]", 
 RowBox[{"Print", "[", 
  RowBox[{"Style", "[", 
   RowBox[{
   "\"\<This exports the simulation results to a csv. The output is already \
incorporated into the .Rdata file which we use to make the graphs in the \
paper.\>\"", ",", "Red"}], " ", "]"}], "]"}], "\[IndentingNewLine]", 
 RowBox[{"Export", "[", 
  RowBox[{"\"\<Output/sims2.csv\>\"", ",", 
   RowBox[{"Transpose", "[", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"Chop", "[", "twoprimaries", "]"}], ",", " ", 
      RowBox[{"Chop", "[", "noprimaries", "]"}], ",", " ", 
      RowBox[{"Chop", "[", "Lprimary", "]"}], ",", " ", 
      RowBox[{"Chop", "[", "Rprimary", "]"}]}], "}"}], "]"}]}], 
  "]"}], "\[IndentingNewLine]"}], "Input",
 CellChangeTimes->{{3.6556969045495787`*^9, 3.655696948342016*^9}, {
   3.6556970857692633`*^9, 3.655697161728763*^9}, 3.655697214494525*^9, {
   3.655697513463725*^9, 3.65569759350391*^9}, {3.65569766750572*^9, 
   3.655697680007352*^9}, {3.655697714017119*^9, 3.6556977250195436`*^9}, {
   3.655698897913082*^9, 3.655698969862565*^9}, {3.6556994348704*^9, 
   3.655699488860113*^9}, {3.6556996147333593`*^9, 3.6556997190950527`*^9}, {
   3.655699830557543*^9, 3.655699864837134*^9}, {3.655700084943285*^9, 
   3.655700145871683*^9}, {3.655700203842985*^9, 3.65570021610183*^9}, {
   3.6557002877921867`*^9, 3.655700798668092*^9}, {3.6557008809874983`*^9, 
   3.655700998104813*^9}, {3.655701083666519*^9, 3.655701218369318*^9}, {
   3.6557012627805977`*^9, 3.655701352195424*^9}, {3.655701400083418*^9, 
   3.6557015528490973`*^9}, {3.6557016052288017`*^9, 3.655701683919537*^9}, {
   3.6557017416732893`*^9, 3.655701809756523*^9}, {3.655701939250244*^9, 
   3.655701959040605*^9}, {3.655702033850402*^9, 3.655702042635998*^9}, {
   3.655702087632134*^9, 3.655702129095551*^9}, {3.655744066333323*^9, 
   3.6557441064909286`*^9}, {3.655744175114567*^9, 3.655744459315431*^9}, {
   3.6557445187667294`*^9, 3.655744615603661*^9}, {3.655744657996176*^9, 
   3.655744666090041*^9}, {3.65574471201794*^9, 3.655744746279996*^9}, {
   3.6557448632204113`*^9, 3.6557448646474667`*^9}, {3.655746691819242*^9, 
   3.655746708399412*^9}, {3.6557468872017097`*^9, 3.655746935976253*^9}, {
   3.655747031418078*^9, 3.65574703720076*^9}, {3.655747139019821*^9, 
   3.655747160641302*^9}, {3.6557472417538357`*^9, 3.655747245786399*^9}, {
   3.6557472943783607`*^9, 3.655747353199794*^9}, {3.655747946573283*^9, 
   3.655747962426811*^9}, {3.655748052135418*^9, 3.6557482678866796`*^9}, {
   3.655748492487506*^9, 3.6557486523875837`*^9}, {3.655748709444124*^9, 
   3.655748898980624*^9}, {3.655779110999722*^9, 3.655779145443544*^9}, {
   3.65577917649615*^9, 3.655779251276925*^9}, {3.6557792878960657`*^9, 
   3.655779299215254*^9}, {3.655779364775825*^9, 3.65577943320492*^9}, {
   3.65577947228869*^9, 3.655779476666627*^9}, {3.65577961816082*^9, 
   3.6557796647346888`*^9}, {3.655779723662045*^9, 3.655779770632847*^9}, {
   3.655779850985765*^9, 3.6557798872434*^9}, {3.655780174294258*^9, 
   3.6557801961537733`*^9}, {3.6557804937421837`*^9, 3.655780524215558*^9}, {
   3.6557805854950953`*^9, 3.655780603663232*^9}, {3.6557806448403788`*^9, 
   3.6557806578512278`*^9}, {3.655780693067786*^9, 3.655780730704965*^9}, {
   3.6557807707114964`*^9, 3.655780772043721*^9}, {3.6557808677908783`*^9, 
   3.655780973469843*^9}, {3.655781455923595*^9, 3.6557814655086727`*^9}, 
   3.655781540304638*^9, {3.6557826633975077`*^9, 3.655782724589387*^9}, {
   3.655783323627974*^9, 3.655783391255227*^9}, {3.6557839520782003`*^9, 
   3.655784014214223*^9}, {3.6557841885482273`*^9, 3.655784273304399*^9}, {
   3.6557844297919817`*^9, 3.65578449584048*^9}, {3.655784920107821*^9, 
   3.655784936661912*^9}, {3.655784999941584*^9, 3.6557850071103*^9}, {
   3.655785149404916*^9, 3.655785195134634*^9}, {3.655785275065568*^9, 
   3.6557852903596077`*^9}, {3.65578564124203*^9, 3.655785690799816*^9}, {
   3.6557857353912363`*^9, 3.655785795077847*^9}, {3.655785827589326*^9, 
   3.655785848354851*^9}, {3.655786060188362*^9, 3.655786063539495*^9}, {
   3.655786226101776*^9, 3.6557862965437813`*^9}, {3.6557863876307697`*^9, 
   3.655786392946278*^9}, {3.655786559223537*^9, 3.655786575134231*^9}, {
   3.6557872297693653`*^9, 3.655787252266862*^9}, {3.655787328129447*^9, 
   3.655787392303783*^9}, {3.655787512301564*^9, 3.65578753108148*^9}, 
   3.655787658575609*^9, {3.6557876892987013`*^9, 3.655787731215684*^9}, {
   3.655787983720475*^9, 3.655787990856142*^9}, {3.655788033376727*^9, 
   3.655788037154777*^9}, {3.655788113780545*^9, 3.655788134489586*^9}, {
   3.655788177780504*^9, 3.655788252461755*^9}, {3.6557883377219667`*^9, 
   3.655788406050454*^9}, {3.655834437163148*^9, 3.6558344374276752`*^9}, {
   3.6558365584074*^9, 3.655836558507166*^9}, 3.655836965806882*^9, {
   3.656443970652401*^9, 3.656444012291102*^9}, {3.656444110373949*^9, 
   3.656444127860427*^9}, {3.656444335613316*^9, 3.656444443158476*^9}, {
   3.656444578586463*^9, 3.656444620270113*^9}, {3.656444711666729*^9, 
   3.656444721417533*^9}, {3.65644476547997*^9, 3.65644477228515*^9}, {
   3.656474509489209*^9, 3.656474611357772*^9}, {3.656474661509121*^9, 
   3.65647471510997*^9}, {3.656474907521687*^9, 3.6564749278471613`*^9}, {
   3.6564750391891003`*^9, 3.6564750439652*^9}, {3.656475074502075*^9, 
   3.656475081357016*^9}, 3.656475119024795*^9, 3.656475157606414*^9, {
   3.656475355128993*^9, 3.656475366188363*^9}, {3.656475527702195*^9, 
   3.656475544874825*^9}, {3.6564765305589867`*^9, 3.656476544905654*^9}, {
   3.656476758871916*^9, 3.656476796995449*^9}, {3.656479386724381*^9, 
   3.656479389331829*^9}, {3.6564795351462297`*^9, 3.65647954535236*^9}, {
   3.656479598988964*^9, 3.656479648927223*^9}, {3.6564796820504017`*^9, 
   3.656479696641938*^9}, {3.6564797333796463`*^9, 3.656479951896508*^9}, 
   3.656480038384046*^9, {3.65648007137309*^9, 3.6564800963629827`*^9}, 
   3.656480225688141*^9, {3.656480308847281*^9, 3.656480420484234*^9}, {
   3.656480650538151*^9, 3.656480755719294*^9}, {3.656480839444726*^9, 
   3.656480858587591*^9}, 3.6564808941110563`*^9, {3.6565645412588787`*^9, 
   3.656564560200672*^9}, {3.656564599262755*^9, 3.656564626351812*^9}, {
   3.656564666611518*^9, 3.656564685381269*^9}, 3.656564734050688*^9, {
   3.656567073318323*^9, 3.6565670901380377`*^9}, {3.656567133344804*^9, 
   3.656567160547975*^9}, {3.6565672978031797`*^9, 3.656567299574399*^9}, {
   3.6565677238535*^9, 3.656567775423768*^9}, {3.656567808310503*^9, 
   3.656567815550397*^9}, 3.656567895147842*^9, 3.656567927083281*^9, 
   3.6565679594670353`*^9, {3.656567994729938*^9, 3.656568147609496*^9}, {
   3.656568190448594*^9, 3.656568299389679*^9}, 3.656568470149192*^9, {
   3.656568550919259*^9, 3.6565686279740877`*^9}, {3.656568723652186*^9, 
   3.656568732051841*^9}, {3.656568772338716*^9, 3.656568791138753*^9}, {
   3.6565688831037607`*^9, 3.656568951005419*^9}, {3.656568998913699*^9, 
   3.656569062375802*^9}, 3.6565991968854923`*^9, {3.656599229548421*^9, 
   3.656599269499651*^9}, 3.656599778910634*^9, {3.656602085123723*^9, 
   3.656602128896946*^9}, {3.656602196848732*^9, 3.656602230509688*^9}, {
   3.656602261452573*^9, 3.6566023128154373`*^9}, {3.6566024152428303`*^9, 
   3.656602415811593*^9}, {3.656602701188323*^9, 3.65660270492973*^9}, {
   3.65660273744816*^9, 3.656602743990909*^9}, {3.6566027987302732`*^9, 
   3.65660281212994*^9}, {3.6566028424683743`*^9, 3.65660284465926*^9}, {
   3.6566029152582483`*^9, 3.656602934026082*^9}, 3.65660308851546*^9, {
   3.656603183864913*^9, 3.656603190641493*^9}, {3.656603224909052*^9, 
   3.656603228757324*^9}, {3.656603349745324*^9, 3.656603412647931*^9}, {
   3.656603475732348*^9, 3.656603502249844*^9}, {3.656603604202389*^9, 
   3.656603710719249*^9}, {3.656603792078651*^9, 3.656603841591642*^9}, {
   3.6566038817216673`*^9, 3.656603920278763*^9}, {3.65660397560846*^9, 
   3.656604000903378*^9}, {3.656604695467661*^9, 3.6566047659404993`*^9}, {
   3.6566048040687237`*^9, 3.656604867062207*^9}, {3.656610094609708*^9, 
   3.656610096912027*^9}, 3.656610593395219*^9, 3.6566114661103573`*^9, 
   3.656611707852213*^9, {3.6566122950792933`*^9, 3.656612347886999*^9}, {
   3.656624665128845*^9, 3.656624744452305*^9}, 3.656695448027432*^9, {
   3.656695757248652*^9, 3.6566957619727077`*^9}, {3.656695792140415*^9, 
   3.65669586145362*^9}, {3.656695928894565*^9, 3.656695945975415*^9}, {
   3.661023583564548*^9, 3.661023625549798*^9}, {3.6610555250442247`*^9, 
   3.661055553537571*^9}, {3.661056162299157*^9, 3.661056219154682*^9}, 
   3.661056366195716*^9, {3.661056409015252*^9, 3.661056470473908*^9}, {
   3.661056514482748*^9, 3.661056649695445*^9}, {3.661056711225555*^9, 
   3.661056818831669*^9}, {3.6610568651342163`*^9, 3.6610569621476917`*^9}, {
   3.661057051575919*^9, 3.6610571558805103`*^9}, {3.661057789077402*^9, 
   3.6610578242415524`*^9}, {3.661058197523364*^9, 3.661058197634058*^9}, {
   3.661058598186194*^9, 3.661058617717147*^9}, {3.661059023487361*^9, 
   3.6610590685867643`*^9}, {3.661196325106153*^9, 3.661196343538898*^9}, {
   3.6612281950085897`*^9, 3.661228229667182*^9}, {3.661229192924473*^9, 
   3.661229208831953*^9}, {3.661229361228341*^9, 3.66122937995929*^9}, {
   3.663605426866475*^9, 3.6636054275974216`*^9}, {3.664301828135516*^9, 
   3.664301940255706*^9}, 3.664303988973629*^9, {3.6643040743572397`*^9, 
   3.664304114866682*^9}, {3.664304180673052*^9, 3.664304180751899*^9}, {
   3.6643042381741047`*^9, 3.664304275603153*^9}, {3.665364010690982*^9, 
   3.665364048677452*^9}, 3.66536464991103*^9, {3.6654178091159163`*^9, 
   3.665417829861264*^9}, {3.66541805215619*^9, 3.665418071382758*^9}, {
   3.665418176900446*^9, 3.665418183553877*^9}, {3.665418467655634*^9, 
   3.665418478016315*^9}, {3.6656953507307568`*^9, 3.66569535682023*^9}, {
   3.6656954064672203`*^9, 3.665695407731065*^9}, 3.665894959531279*^9, {
   3.665978393515964*^9, 3.665978406008376*^9}, {3.665978436617187*^9, 
   3.66597846961556*^9}, 3.665978522076048*^9, {3.6659785551619*^9, 
   3.665978565390005*^9}, {3.6661549840674877`*^9, 3.666155008129917*^9}, {
   3.6661550597659283`*^9, 3.666155088758397*^9}, 3.666155119134183*^9, {
   3.666155844780158*^9, 3.666155883143176*^9}, 3.666155945272677*^9, {
   3.6661559773607073`*^9, 3.6661560030480757`*^9}, 3.6661566715783*^9, {
   3.66615671124839*^9, 3.666156737824297*^9}, 3.666156771536497*^9, {
   3.666156802381719*^9, 3.666156806557921*^9}, {3.6662199120790997`*^9, 
   3.666219916806625*^9}, {3.6662202378859797`*^9, 3.6662202380622253`*^9}, {
   3.666222602301866*^9, 3.666222663376761*^9}, {3.666224712997427*^9, 
   3.6662247871075068`*^9}, {3.666225356050218*^9, 3.666225360710042*^9}, 
   3.666225606637322*^9, {3.6662397474680433`*^9, 3.6662397523516283`*^9}, {
   3.666240568253304*^9, 3.66624060842279*^9}, {3.666453700947694*^9, 
   3.666453701332995*^9}, {3.6679679250375*^9, 3.667967990762103*^9}, {
   3.667968140463832*^9, 3.6679681492391443`*^9}, {3.668018290598168*^9, 
   3.66801829075908*^9}, {3.66801887891685*^9, 3.6680189005972853`*^9}, {
   3.668018944917727*^9, 3.6680189909672117`*^9}, {3.668019021890527*^9, 
   3.668019044220525*^9}, {3.668019075869595*^9, 3.6680190929559793`*^9}, {
   3.66801915072464*^9, 3.6680191962173557`*^9}, {3.668019234749444*^9, 
   3.668019345377239*^9}, 3.668019393602047*^9, 3.668029637154789*^9, {
   3.668031830293798*^9, 3.668031847829191*^9}, 3.668031923310047*^9, 
   3.668031962905039*^9, 3.668033660623436*^9, 3.66803371403985*^9, 
   3.668033762453415*^9, 3.6680338146139727`*^9, {3.6680338522636003`*^9, 
   3.668033981451724*^9}, 3.668034383558654*^9, {3.6682559460341787`*^9, 
   3.668255949579508*^9}, {3.668353344544366*^9, 3.668353350755664*^9}, 
   3.668353749093267*^9, 3.668353782930604*^9, 3.6683538153563757`*^9, 
   3.668353874261825*^9, 3.668353906366062*^9, 3.668353939949061*^9, 
   3.6683539927878723`*^9, 3.668354051387344*^9, {3.6683541244854603`*^9, 
   3.668354134030307*^9}, {3.668354791606987*^9, 3.668354797882305*^9}, {
   3.668354893741769*^9, 3.66835491601759*^9}, {3.6683549754892197`*^9, 
   3.668354996854433*^9}, {3.668355055521628*^9, 3.668355083170212*^9}, 
   3.668785951411257*^9, 3.668785996275543*^9, 3.668786044718202*^9, 
   3.66878608091442*^9, {3.668787012101677*^9, 3.668787022906549*^9}, {
   3.668787135858787*^9, 3.668787161185461*^9}, {3.67076989727452*^9, 
   3.670769897481184*^9}, {3.67240777878127*^9, 3.672407779140691*^9}, {
   3.672978378139676*^9, 3.6729783786814213`*^9}, {3.673753202670354*^9, 
   3.67375322983908*^9}, {3.673753381610606*^9, 3.673753471039565*^9}, {
   3.673753506113686*^9, 3.6737535102030153`*^9}, {3.673753567434441*^9, 
   3.6737537074040117`*^9}, {3.673753743436824*^9, 3.673753748599249*^9}, {
   3.673753859520747*^9, 3.673753879583106*^9}, {3.6737539319768476`*^9, 
   3.673753938657332*^9}, {3.673754004447267*^9, 3.6737540339094553`*^9}, {
   3.673754117737503*^9, 3.673754237569686*^9}, 3.6737546451445723`*^9, 
   3.673754685366797*^9, 3.673754764835864*^9, 3.673754797226262*^9, 
   3.673754828810038*^9, {3.6737548742629423`*^9, 3.6737549225715313`*^9}, 
   3.673754960551587*^9, {3.67375499495562*^9, 3.673755079478938*^9}, 
   3.673755134673111*^9, {3.6737558265515327`*^9, 3.673755893889888*^9}, {
   3.6738427818316*^9, 3.6738428593011713`*^9}, {3.673843022351122*^9, 
   3.67384303217588*^9}, {3.674226137992115*^9, 3.67422619472686*^9}, {
   3.67422655361826*^9, 3.674226600795897*^9}, {3.674226631430769*^9, 
   3.674226678133148*^9}, {3.674226750127736*^9, 3.674226797694374*^9}, {
   3.674226830535409*^9, 3.674226877047233*^9}, {3.6742330208848057`*^9, 
   3.67423304742671*^9}, 3.674233556995833*^9, {3.674233631795946*^9, 
   3.6742336991897163`*^9}, {3.674233767589295*^9, 3.6742337741981297`*^9}, {
   3.6742341712407084`*^9, 3.674234179849358*^9}, {3.6742346308100767`*^9, 
   3.6742348618901873`*^9}, {3.6742349024269876`*^9, 
   3.6742350351643753`*^9}, {3.674235101078898*^9, 3.6742351470973167`*^9}, {
   3.674235362204145*^9, 3.674235437045094*^9}, {3.674235483423118*^9, 
   3.674235529432592*^9}, {3.6742355633377457`*^9, 3.674235617287084*^9}, {
   3.6742358907146063`*^9, 3.674235991920731*^9}, {3.6742360450894537`*^9, 
   3.674236057779792*^9}, {3.674840346560136*^9, 3.674840386274868*^9}, {
   3.6748404754467382`*^9, 3.6748405426744337`*^9}, {3.674842517940474*^9, 
   3.6748425239849443`*^9}, {3.674842580758582*^9, 3.67484259495463*^9}, {
   3.6748426657914467`*^9, 3.67484266616017*^9}, 3.674842806326234*^9, {
   3.674843089910747*^9, 3.674843185943738*^9}, {3.674844419020769*^9, 
   3.674844807107823*^9}, {3.6748448544287367`*^9, 3.674844879394603*^9}, {
   3.675464979675335*^9, 3.675464988623948*^9}, 3.679768962833537*^9, 
   3.679777146091179*^9, {3.6810628807523737`*^9, 3.6810630070635157`*^9}, {
   3.681063038207281*^9, 3.681063073580675*^9}, {3.681063186304368*^9, 
   3.681063278404393*^9}, {3.681063513219605*^9, 3.681063619767761*^9}, {
   3.6810637884013987`*^9, 3.681063827842473*^9}, {3.681063877243496*^9, 
   3.681063898997061*^9}, 3.6810840816847563`*^9, {3.681084246207885*^9, 
   3.681084247672018*^9}, {3.681094791034171*^9, 3.681094792852931*^9}, {
   3.681094858840102*^9, 3.681094865676208*^9}, {3.68109536525331*^9, 
   3.681095439590947*^9}, 3.6810957442150784`*^9, {3.681095815029809*^9, 
   3.681095917141533*^9}, {3.68109595852535*^9, 3.681095960284712*^9}, {
   3.68109667101359*^9, 3.681096671355466*^9}, {3.681096859344351*^9, 
   3.681097021086933*^9}, {3.681097561004352*^9, 3.681097657618351*^9}, {
   3.681097692049062*^9, 3.681097751689946*^9}, {3.681098074199958*^9, 
   3.681098093780075*^9}, {3.681098251939355*^9, 3.681098279709908*^9}, {
   3.6810986640537987`*^9, 3.681098699347838*^9}, {3.681143252289137*^9, 
   3.681143351644944*^9}, {3.6811434597671432`*^9, 3.681143522406806*^9}, {
   3.6811435657886133`*^9, 3.681143684104453*^9}, {3.681143811010682*^9, 
   3.681143816909189*^9}, {3.681143883115938*^9, 3.681143910245565*^9}, {
   3.681143975759418*^9, 3.6811439860132523`*^9}, {3.681144084527836*^9, 
   3.681144108026678*^9}, {3.681144216093721*^9, 3.681144305266738*^9}, {
   3.681144381730763*^9, 3.681144402157851*^9}, 3.681144482476859*^9, 
   3.681144723593614*^9, {3.681144797454055*^9, 3.681144974902609*^9}, {
   3.681145538884254*^9, 3.681145582136866*^9}, {3.681145630469822*^9, 
   3.681145655242414*^9}, {3.681145685336232*^9, 3.6811457582647133`*^9}, {
   3.681145891713855*^9, 3.681145894917603*^9}, {3.681145989852735*^9, 
   3.6811459925234623`*^9}, {3.681146082194442*^9, 3.681146084474386*^9}, {
   3.681146225332096*^9, 3.6811462277315683`*^9}, {3.681146317642667*^9, 
   3.681146352498068*^9}, {3.681146412349124*^9, 3.681146472595998*^9}, {
   3.681146558385929*^9, 3.681146560817416*^9}, {3.681146893216846*^9, 
   3.681146895841*^9}, {3.681147057101383*^9, 3.68114710639242*^9}, {
   3.681147346561636*^9, 3.68114735135569*^9}, {3.681147401468254*^9, 
   3.6811474607485943`*^9}, 3.681147522196763*^9, {3.681147739747787*^9, 
   3.6811477623270473`*^9}, {3.681147793070963*^9, 3.681147797797327*^9}, {
   3.68114785137181*^9, 3.681147856542211*^9}, {3.681147956564603*^9, 
   3.681147958996069*^9}, {3.681148117758882*^9, 3.681148120135434*^9}, 
   3.681148168404652*^9, {3.681148258607171*^9, 3.681148277150629*^9}, {
   3.68114831119247*^9, 3.68114831618908*^9}, {3.681148530581483*^9, 
   3.681148599862707*^9}, {3.681148657926941*^9, 3.681148712198728*^9}, {
   3.6811487427815657`*^9, 3.6811488544572773`*^9}, {3.6811489239323063`*^9, 
   3.68114893182622*^9}, {3.681149030688048*^9, 3.6811490502754383`*^9}, {
   3.681149097442711*^9, 3.681149104463245*^9}, {3.68114913632325*^9, 
   3.681149167642371*^9}, {3.6811492041140757`*^9, 3.681149229910213*^9}, {
   3.681149599382193*^9, 3.681149719053691*^9}, {3.681149770357382*^9, 
   3.681149928689267*^9}, {3.681149970975169*^9, 3.681150142406597*^9}, {
   3.681150203750476*^9, 3.681150232869417*^9}, {3.6811502666790667`*^9, 
   3.6811503832267113`*^9}, {3.6811504268229628`*^9, 3.681150537955812*^9}, {
   3.681150772988089*^9, 3.68115082218536*^9}, {3.6811508897175694`*^9, 
   3.681150981423316*^9}, {3.6811510457783337`*^9, 3.681151046946452*^9}, {
   3.681151171986701*^9, 3.681151200017424*^9}, {3.681151474375023*^9, 
   3.681151504108967*^9}, {3.6811515496312313`*^9, 3.681151693289844*^9}, {
   3.68115219441376*^9, 3.681152238542252*^9}, {3.6811522708292437`*^9, 
   3.681152307037229*^9}, {3.681152351603984*^9, 3.68115247090504*^9}, 
   3.681152701618003*^9, 3.68115290992269*^9, {3.681152941925377*^9, 
   3.681152991963181*^9}, {3.681153022005909*^9, 3.681153056327114*^9}, {
   3.6811617406059217`*^9, 3.6811618245510283`*^9}, {3.6811618583925037`*^9, 
   3.681161881947967*^9}, {3.6811619146411943`*^9, 3.681161928935604*^9}, {
   3.681162017396137*^9, 3.681162057573429*^9}, {3.6811621046417913`*^9, 
   3.681162142964425*^9}, {3.6811621960934258`*^9, 3.681162299963286*^9}, {
   3.681162358220017*^9, 3.681162412729548*^9}, {3.6811643682439823`*^9, 
   3.68116444276239*^9}, {3.681164556714806*^9, 3.681164601373633*^9}, {
   3.681164723111594*^9, 3.6811647298265657`*^9}, {3.681164775391477*^9, 
   3.6811647834517813`*^9}, {3.6811648679935703`*^9, 
   3.6811649052364197`*^9}, {3.681165131581167*^9, 3.681165138870425*^9}, 
   3.681165276523944*^9, {3.681169173017664*^9, 3.681169174311305*^9}, {
   3.681169407657935*^9, 3.6811695334045277`*^9}, {3.681169654032877*^9, 
   3.6811697029779043`*^9}, {3.681169738644771*^9, 3.681169776027862*^9}, {
   3.681169841047707*^9, 3.681169849682024*^9}, {3.681170172886101*^9, 
   3.681170176738043*^9}, {3.68117031223575*^9, 3.681170353121282*^9}, {
   3.681170910631763*^9, 3.681170955197617*^9}, {3.681171029694336*^9, 
   3.6811711916821136`*^9}, {3.6811715149992*^9, 3.681171557670632*^9}, {
   3.681171593042083*^9, 3.681171662632987*^9}, {3.6811719016480913`*^9, 
   3.681171960341846*^9}, {3.681172138727128*^9, 3.681172145313972*^9}, {
   3.681180318366177*^9, 3.681180632750218*^9}, {3.6811807638986883`*^9, 
   3.681180802551042*^9}, {3.681180863411635*^9, 3.681180890519033*^9}, {
   3.681181183997016*^9, 3.681181204431755*^9}, 3.681182064657395*^9, {
   3.681182328558342*^9, 3.681182335039892*^9}, {3.681182820227943*^9, 
   3.68118282130898*^9}, {3.6812291969161167`*^9, 3.681229220239325*^9}, {
   3.681229282389657*^9, 3.681229282994191*^9}, {3.683565419646818*^9, 
   3.683565425496804*^9}, {3.683565458791307*^9, 3.683565468269518*^9}, 
   3.683892233752467*^9, {3.6838922662427073`*^9, 3.683892311218069*^9}, {
   3.6838930180970297`*^9, 3.683893043863544*^9}, 3.683893280076545*^9, {
   3.6838933390722313`*^9, 3.683893342333606*^9}, 3.683893431926052*^9, {
   3.683894213454645*^9, 3.683894225332776*^9}, {3.6838942711853*^9, 
   3.683894329800722*^9}, {3.683894360514092*^9, 3.683894425924917*^9}, 
   3.6838975587077007`*^9, {3.683897823689829*^9, 3.683897843241229*^9}, {
   3.6839012539801073`*^9, 3.68390134568299*^9}, {3.6839014415385227`*^9, 
   3.683901486670298*^9}, {3.6839015682977552`*^9, 3.683901628892839*^9}, {
   3.683901688945384*^9, 3.6839017791501093`*^9}, {3.683901813261648*^9, 
   3.683901850408699*^9}, {3.683901881573168*^9, 3.6839019630489273`*^9}, {
   3.683902101434054*^9, 3.683902126934218*^9}, 3.683902237749786*^9, {
   3.683902276282715*^9, 3.683902276830513*^9}, {3.6839023278623857`*^9, 
   3.683902375604822*^9}, {3.683902406623643*^9, 3.6839024431460857`*^9}, {
   3.6839028365169163`*^9, 3.683902956877437*^9}, 3.683903073987175*^9, {
   3.6839031055350313`*^9, 3.6839032876217422`*^9}, {3.683903318792428*^9, 
   3.683903367952126*^9}, {3.683903420311298*^9, 3.683903577339014*^9}, {
   3.6839036386326723`*^9, 3.683903808441792*^9}, {3.683903942763453*^9, 
   3.683903985153413*^9}, {3.6839040747188263`*^9, 3.683904114546836*^9}, {
   3.683904314929718*^9, 3.68390447921596*^9}, {3.683904514163961*^9, 
   3.683904591344945*^9}, {3.683904672807591*^9, 3.683904708331335*^9}, {
   3.6839047435916986`*^9, 3.683904770280657*^9}, {3.6839048063765173`*^9, 
   3.683904846967449*^9}, {3.68390497634664*^9, 3.683905064838929*^9}, {
   3.683905262737903*^9, 3.683905343735585*^9}, {3.683905436193942*^9, 
   3.683905461121059*^9}, {3.683905503322003*^9, 3.683905546336514*^9}, {
   3.6839060610369053`*^9, 3.68390606128048*^9}, {3.6839061712425013`*^9, 
   3.6839062645906353`*^9}, {3.6839063066063023`*^9, 3.683906317795884*^9}, {
   3.6839072415267563`*^9, 3.683907292177362*^9}, {3.683991339977468*^9, 
   3.683991450673688*^9}, {3.683991533465312*^9, 3.68399154305653*^9}, {
   3.683991605628922*^9, 3.683991654556541*^9}, {3.683991952539225*^9, 
   3.683991958604719*^9}, {3.683992141151143*^9, 3.683992196401704*^9}, {
   3.683992279376669*^9, 3.6839922888503857`*^9}, {3.683992372102684*^9, 
   3.68399257589279*^9}, 3.683992680660678*^9, {3.68399274740197*^9, 
   3.683992751736013*^9}, {3.6839930277973127`*^9, 3.683993028245635*^9}, {
   3.683993098691717*^9, 3.68399312324222*^9}, {3.683993389691242*^9, 
   3.683993402014574*^9}, {3.692619464456427*^9, 3.6926196400401583`*^9}, {
   3.692619759463627*^9, 3.69261977346439*^9}, {3.692619877972939*^9, 
   3.692619935403736*^9}, {3.692620028565526*^9, 3.692620033455007*^9}, {
   3.692620233550186*^9, 3.692620233811203*^9}, {3.692620865759804*^9, 
   3.692620865902776*^9}, {3.69262101799091*^9, 3.6926210180923977`*^9}, {
   3.6926211787111473`*^9, 3.692621179817383*^9}, {3.692621288701289*^9, 
   3.692621289056712*^9}, {3.692621405782123*^9, 3.6926214060256243`*^9}, {
   3.692621526117157*^9, 3.6926215268624887`*^9}, {3.6926216346985188`*^9, 
   3.692621634886984*^9}, {3.692621665303541*^9, 3.692621665419945*^9}, {
   3.692621858899351*^9, 3.692621859077977*^9}, 3.692622057210783*^9, {
   3.692622282185726*^9, 3.6926222823289127`*^9}, {3.6926228641130533`*^9, 
   3.692622864219365*^9}, {3.69262295966648*^9, 3.692622959786669*^9}, {
   3.6926230710685863`*^9, 3.6926230719984303`*^9}, {3.692623174940878*^9, 
   3.692623175700794*^9}, {3.6926232593529177`*^9, 3.6926232598227367`*^9}, {
   3.692623330093791*^9, 3.692623330209894*^9}, {3.69262341514095*^9, 
   3.6926234152618732`*^9}, {3.6926235012809267`*^9, 3.692623503596023*^9}, {
   3.6926235830416327`*^9, 3.6926235831364202`*^9}, {3.692623656442459*^9, 
   3.692623656845418*^9}, {3.692623729135895*^9, 3.6926237297020893`*^9}, {
   3.692623838419091*^9, 3.692623838822535*^9}, {3.692623915647265*^9, 
   3.692623918816534*^9}, {3.692638935570221*^9, 3.692638939624324*^9}, {
   3.692640763806162*^9, 3.6926407674438467`*^9}, {3.692640894300507*^9, 
   3.69264089461125*^9}, {3.693091654829733*^9, 3.693091721793475*^9}, {
   3.693091755128813*^9, 3.693091772942811*^9}, {3.6930918379214582`*^9, 
   3.693091872451353*^9}, {3.693091911008156*^9, 3.6930919640895357`*^9}, {
   3.693092152240547*^9, 3.693092217052526*^9}, {3.69309237808772*^9, 
   3.69309239710256*^9}, {3.6930927009133043`*^9, 3.693092702894843*^9}, {
   3.693092923952589*^9, 3.693092926993292*^9}, {3.6930934014394493`*^9, 
   3.693093420469225*^9}, {3.6930945135440187`*^9, 3.693094514161789*^9}, {
   3.694184104810199*^9, 3.694184116828127*^9}, 3.694261082011174*^9, {
   3.6942612220834913`*^9, 3.694261224344653*^9}, 3.694261357526672*^9, 
   3.69426236934452*^9, {3.694262513808316*^9, 3.6942625238201036`*^9}, {
   3.694262582158804*^9, 3.69426259785588*^9}, 3.69426273964891*^9, 
   3.6942628766937532`*^9, 3.6942631513863573`*^9, {3.694263559851947*^9, 
   3.694263562940611*^9}, 3.694263760836919*^9, 3.726766204264524*^9, {
   3.726766293363641*^9, 3.7267662965436563`*^9}, {3.7267666733737783`*^9, 
   3.726766693773964*^9}, {3.726766726583934*^9, 3.7267667293644657`*^9}, {
   3.729616873650029*^9, 3.72961688878511*^9}, {3.729616996473957*^9, 
   3.729617018637829*^9}, {3.729617296296701*^9, 3.7296173846287527`*^9}, {
   3.729688649826312*^9, 3.729688685456324*^9}, {3.7296887339727488`*^9, 
   3.7296887780264893`*^9}, {3.729688852774424*^9, 3.729688862175754*^9}, {
   3.729688918117223*^9, 3.729688928999341*^9}, 3.729689028011446*^9, 
   3.729689294818707*^9, {3.729689351241542*^9, 3.729689356686193*^9}, 
   3.729780755505492*^9, {3.7297808789667177`*^9, 3.729780890631983*^9}, {
   3.729780968103964*^9, 3.729780968372796*^9}, {3.729781058232003*^9, 
   3.729781058523499*^9}, {3.729781098448723*^9, 3.729781098622414*^9}, {
   3.729781178932371*^9, 3.729781179064736*^9}, {3.729810981996698*^9, 
   3.729810985460874*^9}, {3.72981107033946*^9, 3.729811126391548*^9}, {
   3.729811199423581*^9, 3.7298112022396307`*^9}, {3.7298117407071247`*^9, 
   3.7298117430166807`*^9}, {3.7298118173750257`*^9, 
   3.7298119118663054`*^9}, {3.7298119560180597`*^9, 3.729811956704617*^9}, {
   3.7298123499034986`*^9, 3.72981235920765*^9}, {3.729812774625225*^9, 
   3.729812795906489*^9}, {3.729812875062091*^9, 3.729812902514245*^9}, {
   3.729812963601276*^9, 3.729812972431118*^9}, {3.729813039690771*^9, 
   3.7298130472447042`*^9}, 3.72981313343406*^9, {3.7298131941504602`*^9, 
   3.7298132169899693`*^9}, {3.729813394671528*^9, 3.7298133947888403`*^9}, {
   3.72981348147528*^9, 3.7298134860559273`*^9}, {3.729813616492292*^9, 
   3.729813635120912*^9}, {3.729813963518621*^9, 3.729813980039359*^9}, {
   3.729814075812235*^9, 3.729814075975288*^9}, {3.729814114187717*^9, 
   3.729814115056424*^9}, {3.729814202660054*^9, 3.729814202872526*^9}, {
   3.730418792753633*^9, 3.730418793775505*^9}, {3.7304190817264013`*^9, 
   3.7304190827540703`*^9}, {3.730419374769096*^9, 3.730419375334346*^9}, {
   3.730419471697815*^9, 3.7304194718970003`*^9}, {3.730457502715914*^9, 
   3.730457505994028*^9}, {3.7304575803104258`*^9, 3.730457580492346*^9}, 
   3.7304576131012278`*^9, {3.730457759082149*^9, 3.730457759588202*^9}, {
   3.730457802637288*^9, 3.73045780280159*^9}, {3.730457837485338*^9, 
   3.7304578376471777`*^9}, {3.730458446479432*^9, 3.730458446920485*^9}, {
   3.7304629959664707`*^9, 3.7304629973193293`*^9}, {3.730470168857929*^9, 
   3.7304702048476562`*^9}, {3.730470624653699*^9, 3.730470667661891*^9}, {
   3.730470739936076*^9, 3.730470763394309*^9}, {3.730483370893929*^9, 
   3.730483376329999*^9}, {3.7304989048562813`*^9, 3.730498906563767*^9}, {
   3.730882368812319*^9, 3.7308823716219053`*^9}, {3.730898122073617*^9, 
   3.7308981223029823`*^9}, 3.731637117962061*^9, {3.733418707518552*^9, 
   3.733418709828236*^9}, {3.733449085571426*^9, 3.73344908840239*^9}, {
   3.733487618857748*^9, 3.733487622693569*^9}, 3.733494642721573*^9, {
   3.746753636985615*^9, 3.7467536417612953`*^9}, {3.7467538586506433`*^9, 
   3.746753864478969*^9}, {3.763834881381229*^9, 3.763834888275917*^9}, 
   3.7638349460369663`*^9, {3.76383498691961*^9, 3.7638350019782877`*^9}, {
   3.763835042502132*^9, 3.7638350640421333`*^9}, 3.763840449899445*^9, 
   3.763842692499915*^9, {3.7638428139609823`*^9, 3.763842901400351*^9}, {
   3.7639161015472813`*^9, 3.763916114167379*^9}, {3.763922198052041*^9, 
   3.7639222172821417`*^9}, {3.76392234824446*^9, 3.76392240974572*^9}, {
   3.76392374741816*^9, 3.763923749611561*^9}, {3.763927497375207*^9, 
   3.76392750447971*^9}, {3.763927766768693*^9, 3.763927770306875*^9}, {
   3.76393464735947*^9, 3.763934669506906*^9}, {3.7639351723471613`*^9, 
   3.763935174586513*^9}, {3.7639356573181133`*^9, 3.763935657511127*^9}, {
   3.763936249903859*^9, 3.763936308887583*^9}, {3.763936403766554*^9, 
   3.763936405800357*^9}, {3.763942055522766*^9, 3.7639420731587477`*^9}, 
   3.7639425878204317`*^9},ExpressionUUID->"e5ce02ec-b780-411d-970b-\
64bb0ab89b0e"],

Cell[BoxData["\[IndentingNewLine]"], "Input",
 CellChangeTimes->{{3.7304182449610662`*^9, 3.730418245904965*^9}, {
   3.7304184359782553`*^9, 3.730418472587286*^9}, {3.730418530248468*^9, 
   3.7304185426593246`*^9}, {3.7304185889022827`*^9, 3.730418605660659*^9}, {
   3.7304576262066803`*^9, 3.730457632050377*^9}, {3.7304705640242023`*^9, 
   3.730470593460845*^9}, {3.730483413366737*^9, 3.730483414403324*^9}, {
   3.730501362631744*^9, 3.730501396170306*^9}, {3.730501429047456*^9, 
   3.730501455475211*^9}, {3.7305017567206917`*^9, 3.730501807500836*^9}, {
   3.7308824131400547`*^9, 3.730882415009934*^9}, {3.730897782191554*^9, 
   3.730897793006845*^9}, {3.731667549946558*^9, 3.731667550165719*^9}, {
   3.733418827120637*^9, 3.733418827209998*^9}, 3.733486396606776*^9, 
   3.733486564956643*^9, {3.7334867971819143`*^9, 3.733486797267219*^9}, {
   3.733489565747549*^9, 3.7334895686617937`*^9}, {3.733491688975277*^9, 
   3.733491695860396*^9}, {3.733491775761808*^9, 3.7334918517409773`*^9}, {
   3.733492606147161*^9, 3.733492636862336*^9}, {3.7334927022933702`*^9, 
   3.733492798570105*^9}, {3.733493197424554*^9, 3.7334932079685793`*^9}, 
   3.733494284899746*^9, 3.733499999641829*^9, {3.746788020194927*^9, 
   3.7467880221226377`*^9}, {3.75987996386348*^9, 3.75988000231784*^9}, {
   3.76384018591149*^9, 3.763840190594982*^9}, 3.763855442877116*^9, {
   3.763921879143838*^9, 3.763921906940062*^9}, {3.763921944708083*^9, 
   3.7639219776068077`*^9}, {3.763923758342009*^9, 3.7639237609061193`*^9}, {
   3.763927323973304*^9, 3.7639273417839203`*^9}, {3.7639277761513643`*^9, 
   3.763927778345275*^9}, 
   3.7639351704353113`*^9},ExpressionUUID->"2e6d5597-638c-4475-a7a1-\
dd658645c32c"],

Cell[CellGroupData[{

Cell[BoxData[""], "Input",
 CellChangeTimes->{{3.733444748597766*^9, 
  3.733444758167605*^9}},ExpressionUUID->"1590703b-5aab-4275-92ce-\
0a83c4d23f82"],

Cell[BoxData[
 InterpretationBox[
  TagBox[
   FrameBox[GridBox[{
      {
       ItemBox[
        TagBox[
         RowBox[{"{", 
          RowBox[{
          "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", 
           ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", 
           "0.`", ",", 
           TemplateBox[{"65679"},
            "OutputSizeLimit`Skeleton",
            DisplayFunction->(FrameBox[
              RowBox[{"\" \[CenterEllipsis]\"", #, "\"\[CenterEllipsis] \""}],
               Background -> GrayLevel[0.75], 
              BaseStyle -> {
               "Deploy", FontColor -> GrayLevel[1], FontSize -> Smaller, 
                ShowStringCharacters -> False}, BaselinePosition -> Baseline, 
              ContentPadding -> False, FrameMargins -> {{1, 1}, {1, 2}}, 
              FrameStyle -> None, RoundingRadius -> 7]& )], ",", 
           "0.39427677191527716`", ",", "0.39427677191527716`", ",", 
           "1.0000000000000002`", ",", "1.0000000000000002`", ",", 
           "1.0000000000000002`", ",", "1.0000000000000002`", ",", 
           "1.0000000000000002`", ",", "1.0000000000000002`", ",", 
           "1.0000000000000002`", ",", "1.0000000000000002`", ",", 
           "1.0000000000000002`", ",", "1.0000000000000002`"}], "}"}],
         Short[#, 5]& ],
        BaseStyle->{Deployed -> False},
        StripOnInput->False]},
      {GridBox[{
         {
          TagBox[
           TooltipBox[
            StyleBox[
             StyleBox[
              DynamicBox[ToBoxes[
                FEPrivate`FrontEndResource[
                "FEStrings", "sizeBriefExplanation"], StandardForm],
               ImageSizeCache->{58., {2., 8.}}],
              StripOnInput->False,
              DynamicUpdating->True], "SuggestionsBarCategory",
             StripOnInput->False],
            StyleBox[
             DynamicBox[
              ToBoxes[
               FEPrivate`FrontEndResource["FEStrings", "sizeExplanation"], 
               StandardForm]], DynamicUpdating -> True, StripOnInput -> 
             False]],
           Annotation[#, 
            Style[
             Dynamic[
              FEPrivate`FrontEndResource["FEStrings", "sizeExplanation"]], 
             DynamicUpdating -> True], "Tooltip"]& ], 
          ButtonBox[
           PaneSelectorBox[{False->
            StyleBox[
             StyleBox[
              DynamicBox[ToBoxes[
                FEPrivate`FrontEndResource["FEStrings", "sizeShowLess"], 
                StandardForm],
               ImageSizeCache->{50., {0., 8.}}],
              StripOnInput->False,
              DynamicUpdating->True], "SuggestionsBarControl",
             StripOnInput->False], True->
            StyleBox[
             StyleBox[
              DynamicBox[ToBoxes[
                FEPrivate`FrontEndResource["FEStrings", "sizeShowLess"], 
                StandardForm],
               ImageSizeCache->{50., {0., 8.}}],
              StripOnInput->False,
              DynamicUpdating->True], "SuggestionsBarControlActive",
             StripOnInput->False]}, Dynamic[
             CurrentValue["MouseOver"]],
            Alignment->Center,
            FrameMargins->0,
            ImageSize->{Automatic, 25}],
           Appearance->None,
           
           ButtonFunction:>OutputSizeLimit`ButtonFunction[
            OutputSizeLimit`Defer, 450, 25721221609575162478, 5/2],
           Enabled->True,
           Evaluator->Automatic,
           Method->"Queued"], 
          ButtonBox[
           PaneSelectorBox[{False->
            StyleBox[
             StyleBox[
              DynamicBox[ToBoxes[
                FEPrivate`FrontEndResource["FEStrings", "sizeShowMore"], 
                StandardForm],
               ImageSizeCache->{56., {0., 8.}}],
              StripOnInput->False,
              DynamicUpdating->True], "SuggestionsBarControl",
             StripOnInput->False], True->
            StyleBox[
             StyleBox[
              DynamicBox[ToBoxes[
                FEPrivate`FrontEndResource["FEStrings", "sizeShowMore"], 
                StandardForm],
               ImageSizeCache->{56., {0., 8.}}],
              StripOnInput->False,
              DynamicUpdating->True], "SuggestionsBarControlActive",
             StripOnInput->False]}, Dynamic[
             CurrentValue["MouseOver"]],
            Alignment->Center,
            FrameMargins->0,
            ImageSize->{Automatic, 25}],
           Appearance->None,
           
           ButtonFunction:>OutputSizeLimit`ButtonFunction[
            OutputSizeLimit`Defer, 450, 25721221609575162478, 5 2],
           Enabled->True,
           Evaluator->Automatic,
           Method->"Queued"], 
          ButtonBox[
           PaneSelectorBox[{False->
            StyleBox[
             StyleBox[
              DynamicBox[ToBoxes[
                FEPrivate`FrontEndResource["FEStrings", "sizeShowAll"], 
                StandardForm],
               ImageSizeCache->{42., {0., 8.}}],
              StripOnInput->False,
              DynamicUpdating->True], "SuggestionsBarControl",
             StripOnInput->False], True->
            StyleBox[
             StyleBox[
              DynamicBox[ToBoxes[
                FEPrivate`FrontEndResource["FEStrings", "sizeShowAll"], 
                StandardForm],
               ImageSizeCache->{42., {0., 8.}}],
              StripOnInput->False,
              DynamicUpdating->True], "SuggestionsBarControlActive",
             StripOnInput->False]}, Dynamic[
             CurrentValue["MouseOver"]],
            Alignment->Center,
            FrameMargins->0,
            ImageSize->{Automatic, 25}],
           Appearance->None,
           
           ButtonFunction:>OutputSizeLimit`ButtonFunction[
            OutputSizeLimit`Defer, 450, 25721221609575162478, Infinity],
           Enabled->True,
           Evaluator->Automatic,
           Method->"Queued"], 
          ButtonBox[
           PaneSelectorBox[{False->
            StyleBox[
             StyleBox[
              DynamicBox[ToBoxes[
                FEPrivate`FrontEndResource["FEStrings", "sizeChangeLimit"], 
                StandardForm],
               ImageSizeCache->{74., {0., 8.}}],
              StripOnInput->False,
              DynamicUpdating->True], "SuggestionsBarControl",
             StripOnInput->False], True->
            StyleBox[
             StyleBox[
              DynamicBox[ToBoxes[
                FEPrivate`FrontEndResource["FEStrings", "sizeChangeLimit"], 
                StandardForm],
               ImageSizeCache->{74., {0., 8.}}],
              StripOnInput->False,
              DynamicUpdating->True], "SuggestionsBarControlActive",
             StripOnInput->False]}, Dynamic[
             CurrentValue["MouseOver"]],
            Alignment->Center,
            FrameMargins->0,
            ImageSize->{Automatic, 25}],
           Appearance->None,
           ButtonFunction:>FrontEndExecute[{
              FrontEnd`SetOptions[
              FrontEnd`$FrontEnd, 
               FrontEnd`PreferencesSettings -> {"Page" -> "Evaluation"}], 
              FrontEnd`FrontEndToken["PreferencesDialog"]}],
           Evaluator->None,
           Method->"Preemptive"]}
        },
        AutoDelete->False,
        FrameStyle->GrayLevel[0.85],
        GridBoxDividers->{"Columns" -> {False, {True}}},
        GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}},
        GridBoxSpacings->{"Columns" -> {{2}}}]}
     },
     DefaultBaseStyle->"Column",
     GridBoxAlignment->{
      "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
       "RowsIndexed" -> {}},
     GridBoxDividers->{
      "Columns" -> {{False}}, "ColumnsIndexed" -> {}, "Rows" -> {{False}}, 
       "RowsIndexed" -> {}},
     GridBoxItemSize->{
      "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, 
       "RowsIndexed" -> {}},
     GridBoxSpacings->{"Columns" -> {
         Offset[0.27999999999999997`], {
          Offset[0.5599999999999999]}, 
         Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
         Offset[0.2], 
         Offset[1.2], {
          Offset[0.4]}, 
         Offset[0.2]}, "RowsIndexed" -> {}}],
    Background->RGBColor[0.9657, 0.9753, 0.9802],
    FrameMargins->{{12, 12}, {0, 15}},
    FrameStyle->GrayLevel[0.85],
    RoundingRadius->5,
    StripOnInput->False],
   Deploy,
   DefaultBaseStyle->"Deploy"],
  Out[450]]], "Output",
 CellChangeTimes->{
  3.733444750371275*^9},ExpressionUUID->"5cf2f4ee-e262-4600-aae8-\
4fd9b7def9cc"]
}, Open  ]]
},
WindowSize->{1182, 1316},
WindowMargins->{{Automatic, 312}, {Automatic, 10}},
FrontEndVersion->"11.3 for Mac OS X x86 (32-bit, 64-bit Kernel) (March 5, \
2018)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[400, 13, 26565, 377, 183, "Input",ExpressionUUID->"70833fa1-0418-4d4c-a562-2eff6d088b3b"],
Cell[CellGroupData[{
Cell[26990, 394, 165605, 4254, 8847, "Input",ExpressionUUID->"81547e81-a673-482f-b72a-7a144e755e92"],
Cell[192598, 4650, 546, 9, 45, "Output",ExpressionUUID->"216300f1-daf6-476b-a4ab-f6e6d2152317"],
Cell[193147, 4661, 530, 9, 45, "Output",ExpressionUUID->"6a1c52c3-9ec8-472c-ad3d-84499c245bf7"],
Cell[193680, 4672, 404, 10, 24, "Message",ExpressionUUID->"e179cf7b-59ff-4e1d-9434-d266686faaf2"],
Cell[194087, 4684, 362, 5, 34, "Output",ExpressionUUID->"19eb7790-2cc3-4f0f-a54b-15b9716df9d6"],
Cell[194452, 4691, 573, 10, 45, "Output",ExpressionUUID->"f118e46d-114f-4527-8db8-e36a8c51ecc6"],
Cell[195028, 4703, 742, 17, 40, "Print",ExpressionUUID->"0cea7d7e-713b-4222-8cf9-d0591892af19"],
Cell[195773, 4722, 637, 11, 44, "Output",ExpressionUUID->"73834a88-482c-42a7-b2eb-20629adb69b4"],
Cell[196413, 4735, 515, 9, 39, "Output",ExpressionUUID->"2783d2c2-79e1-4c76-94b2-e85abce1f634"],
Cell[196931, 4746, 1152, 29, 54, "Output",ExpressionUUID->"9dc84594-cc1b-48b0-a0f5-8b1bd51b5d45"],
Cell[198086, 4777, 523, 9, 39, "Output",ExpressionUUID->"cb569322-c63a-4ffe-97b7-b82b747ea850"],
Cell[198612, 4788, 1070, 30, 54, "Output",ExpressionUUID->"47d67999-abfa-4970-ae03-a0d7cd474b14"],
Cell[199685, 4820, 515, 9, 39, "Output",ExpressionUUID->"2110b939-0ada-4179-9789-6efc50200ee9"],
Cell[200203, 4831, 1175, 30, 54, "Output",ExpressionUUID->"889c5c74-b1cd-4e5e-a23d-32e0a29ca8af"],
Cell[201381, 4863, 523, 9, 39, "Output",ExpressionUUID->"67c3bd6e-3f3c-4ee9-a525-1b0a6784e2ad"],
Cell[201907, 4874, 965, 26, 54, "Output",ExpressionUUID->"29052c2f-ddcc-4c35-a37c-71b9045c519c"],
Cell[202875, 4902, 511, 9, 39, "Output",ExpressionUUID->"c9fe2f9a-dcb1-4448-bcd9-bf1db0a87ee7"],
Cell[CellGroupData[{
Cell[203411, 4915, 1744, 42, 42, "Print",ExpressionUUID->"53f4a2a6-0f21-42ac-856b-afe6321443b1"],
Cell[205158, 4959, 883, 22, 41, "Print",ExpressionUUID->"1e3baf44-d866-4a95-94b5-0d6bbf12a872"],
Cell[206044, 4983, 1791, 44, 42, "Print",ExpressionUUID->"473f66a1-c93d-4433-bd15-b1095f37edd0"]
}, Open  ]],
Cell[207850, 5030, 1461, 37, 55, "Output",ExpressionUUID->"ab7fd995-7ad1-44ff-aefc-d8189ad2dc87"],
Cell[209314, 5069, 565, 10, 44, "Output",ExpressionUUID->"9b5762d0-86d7-45ce-93dd-feca411c8ba3"],
Cell[209882, 5081, 543, 9, 39, "Output",ExpressionUUID->"2ca9d71a-cdcd-422f-8d17-fc6332c71719"],
Cell[210428, 5092, 1995, 51, 75, "Output",ExpressionUUID->"91bae4d7-830c-41b1-ae65-dc70aa897b99"],
Cell[212426, 5145, 551, 9, 39, "Output",ExpressionUUID->"24eed8fa-624e-4325-97a4-f9d55d44833e"],
Cell[212980, 5156, 2023, 52, 75, "Output",ExpressionUUID->"dfd592f4-6882-4a17-8752-bb59b67d9390"],
Cell[215006, 5210, 576, 10, 39, "Output",ExpressionUUID->"58ce69aa-3866-4ee6-9281-88b7e851bb8b"],
Cell[215585, 5222, 1889, 47, 75, "Output",ExpressionUUID->"26c2f772-e64b-4e7c-8a42-33aa8bf5005d"],
Cell[217477, 5271, 588, 11, 39, "Output",ExpressionUUID->"1bc7af7e-96cf-4d37-a0a8-d5d838c1edda"],
Cell[218068, 5284, 1563, 39, 56, "Output",ExpressionUUID->"0c1145d2-9964-4fef-8526-a37aebf70da7"],
Cell[219634, 5325, 510, 9, 39, "Output",ExpressionUUID->"d7bb2c7b-caad-4b38-bdc9-74eb31da2623"],
Cell[CellGroupData[{
Cell[220169, 5338, 2820, 68, 42, "Print",ExpressionUUID->"a10130a4-ec24-4adf-863a-0aac593e76b4"],
Cell[222992, 5408, 1145, 29, 41, "Print",ExpressionUUID->"833d44a2-eedf-4917-ae62-af38a5812632"],
Cell[224140, 5439, 2802, 72, 42, "Print",ExpressionUUID->"56849a09-c373-4ace-ac16-756f1bdac29b"]
}, Open  ]],
Cell[226957, 5514, 2496, 70, 99, "Output",ExpressionUUID->"c60396ba-b931-47a4-bb12-912929b460cd"],
Cell[229456, 5586, 567, 10, 44, "Output",ExpressionUUID->"26b7e3e5-f534-49f2-b438-55615dee9f42"],
Cell[230026, 5598, 576, 10, 39, "Output",ExpressionUUID->"e0288476-0608-4272-97be-33eecc92c38c"],
Cell[230605, 5610, 1956, 52, 75, "Output",ExpressionUUID->"ec392653-7d0b-4845-9816-137bff766d91"],
Cell[232564, 5664, 588, 11, 39, "Output",ExpressionUUID->"a2bb6aa6-c4f5-47a4-8ecf-a8679faa546a"],
Cell[233155, 5677, 1770, 49, 56, "Output",ExpressionUUID->"5af932c5-eaaa-479d-9040-c69f69309a63"],
Cell[234928, 5728, 558, 9, 39, "Output",ExpressionUUID->"9cfb832a-471c-4bd2-a869-37e3201dd3d8"],
Cell[235489, 5739, 2043, 52, 75, "Output",ExpressionUUID->"a29da70a-2289-4c3d-8a9c-17516343be95"],
Cell[237535, 5793, 570, 10, 39, "Output",ExpressionUUID->"52d56f62-c9a8-422e-a1f9-c6e5867ac7cb"],
Cell[238108, 5805, 2045, 52, 75, "Output",ExpressionUUID->"c46f4cf2-ca46-46d0-8b07-009db59a2b5d"],
Cell[240156, 5859, 511, 9, 39, "Output",ExpressionUUID->"6f6067a4-f715-4456-8c94-43f606ce4028"],
Cell[CellGroupData[{
Cell[240692, 5872, 2845, 71, 42, "Print",ExpressionUUID->"268efca3-81f1-4c8b-a138-9c661dc74e98"],
Cell[243540, 5945, 1145, 29, 41, "Print",ExpressionUUID->"ee6d1853-b1d6-4f5b-8db5-589cc674affc"],
Cell[244688, 5976, 2882, 75, 42, "Print",ExpressionUUID->"87f2e15a-aae5-466f-9c1d-65c275f7712f"]
}, Open  ]],
Cell[247585, 6054, 2496, 70, 99, "Output",ExpressionUUID->"8b8dc532-81b4-4a8c-93a2-b527c4e5b86f"],
Cell[250084, 6126, 567, 10, 44, "Output",ExpressionUUID->"5bed58c1-00d9-46fe-805e-35948d042574"],
Cell[250654, 6138, 511, 9, 39, "Output",ExpressionUUID->"bf3b4a66-5bf5-4b3d-81d5-4c1c521a4d8f"],
Cell[251168, 6149, 2155, 57, 75, "Output",ExpressionUUID->"4bf8a431-fbdb-440b-8c6e-514de8ba9b84"],
Cell[253326, 6208, 518, 9, 39, "Output",ExpressionUUID->"91420b9d-a0f1-4245-828a-fa70645921fd"],
Cell[253847, 6219, 2154, 57, 75, "Output",ExpressionUUID->"70ba2762-7a1c-4da6-b5d1-5f4385b944e0"],
Cell[256004, 6278, 511, 9, 39, "Output",ExpressionUUID->"ff81bba3-eadb-4e3d-ac70-c256db459fe7"],
Cell[256518, 6289, 1905, 47, 75, "Output",ExpressionUUID->"4729331b-dc38-4366-82a9-ff5d6895e478"],
Cell[258426, 6338, 521, 9, 39, "Output",ExpressionUUID->"c08826c4-3be7-4f06-8642-15a9f1f6080a"],
Cell[258950, 6349, 1905, 47, 75, "Output",ExpressionUUID->"a3a78f7b-c734-4e3b-aae4-fc896893a79a"],
Cell[260858, 6398, 511, 9, 39, "Output",ExpressionUUID->"faa22f8a-c568-408d-b5d0-01bf8b78635f"],
Cell[CellGroupData[{
Cell[261394, 6411, 2963, 62, 80, "Print",ExpressionUUID->"fd97acee-1da2-4bdf-9e47-f51df693768f"],
Cell[264360, 6475, 1411, 36, 41, "Print",ExpressionUUID->"cdad1b6b-b41f-4a1a-95ff-e88547080602"],
Cell[265774, 6513, 3078, 76, 80, "Print",ExpressionUUID->"122f5d7c-b004-47c5-94a4-8b83e227e5bb"]
}, Open  ]],
Cell[268867, 6592, 2518, 66, 99, "Output",ExpressionUUID->"95c9d51b-750f-48b7-b9c9-d6c124e14e7d"],
Cell[271388, 6660, 545, 9, 44, "Output",ExpressionUUID->"a632c8a0-f1af-40f9-badc-c3df5c9fddaf"],
Cell[271936, 6671, 601, 11, 39, "Output",ExpressionUUID->"70a8903d-9633-4c8f-8d5a-db19324d6187"],
Cell[272540, 6684, 1163, 26, 24, "Print",ExpressionUUID->"e67b8289-d991-4976-81aa-91f189be1bd8"],
Cell[273706, 6712, 1911, 57, 59, "Output",ExpressionUUID->"c7da151b-1cfd-4603-9a72-2c4c568bbd85"],
Cell[275620, 6771, 1165, 26, 24, "Print",ExpressionUUID->"8ba57895-89d9-4dd0-a9d6-ab12c34715f9"],
Cell[276788, 6799, 1889, 57, 59, "Output",ExpressionUUID->"9f3faa34-90dc-486c-8653-615eadd3d598"],
Cell[278680, 6858, 1163, 26, 24, "Print",ExpressionUUID->"d18b8fe8-1c1a-4824-9a16-8b5a8e1131f8"],
Cell[279846, 6886, 1799, 53, 59, "Output",ExpressionUUID->"a6ee1c78-09ab-43a9-b07b-9d6c6730c689"],
Cell[281648, 6941, 1164, 26, 24, "Print",ExpressionUUID->"36c7e4f4-559d-43f7-8884-359fd0373512"],
Cell[282815, 6969, 1783, 54, 59, "Output",ExpressionUUID->"2b831b92-d0c4-46f8-9ac9-fd0dc4a834e2"],
Cell[284601, 7025, 596, 12, 45, "Output",ExpressionUUID->"edfdee22-88e9-4721-b5d1-7e11f8540f99"],
Cell[CellGroupData[{
Cell[285222, 7041, 842, 18, 44, "Print",ExpressionUUID->"d281ff26-45ec-470d-8acb-0a5ca716c096"],
Cell[286067, 7061, 930, 19, 24, "Print",ExpressionUUID->"2cb37cdd-253e-4cb2-8b05-375daf22a762"]
}, Open  ]],
Cell[287012, 7083, 600, 12, 45, "Output",ExpressionUUID->"7406690a-3aa4-42ec-b96d-f6fed6be1946"],
Cell[CellGroupData[{
Cell[287637, 7099, 700, 16, 44, "Print",ExpressionUUID->"50c200d5-7773-4de3-a417-775a2c4e7264"],
Cell[288340, 7117, 755, 13, 44, "Print",ExpressionUUID->"1b5112a9-15ef-4d2d-b758-f779d9d3b992"],
Cell[289098, 7132, 586, 10, 24, "Print",ExpressionUUID->"0a85266f-655c-47d6-a494-29c196551345"]
}, Open  ]],
Cell[289699, 7145, 563, 10, 45, "Output",ExpressionUUID->"7eda215f-66d9-44f9-b564-36274ef47252"],
Cell[290265, 7157, 824, 18, 24, "Print",ExpressionUUID->"0dbfb59b-5244-4df8-9b57-22ef1a6385f2"],
Cell[291092, 7177, 347, 9, 24, "Message",ExpressionUUID->"ef4c6ddb-a927-4107-86f9-036b30f1803c"],
Cell[291442, 7188, 369, 6, 34, "Output",ExpressionUUID->"df6b987a-9543-44db-bc1d-f930b7d4f6df"],
Cell[291814, 7196, 380, 7, 34, "Output",ExpressionUUID->"a50418f1-33c5-4e5b-96fc-28b61aa1785b"],
Cell[292197, 7205, 394, 7, 34, "Output",ExpressionUUID->"9552c897-d6bb-4686-bde4-80867e0f0024"],
Cell[292594, 7214, 510, 9, 24, "Print",ExpressionUUID->"fbc279fa-5b73-429a-ae9f-368c4921f733"]
}, Open  ]],
Cell[293119, 7226, 97310, 2050, 4859, "Input",ExpressionUUID->"e5ce02ec-b780-411d-970b-64bb0ab89b0e"],
Cell[390432, 9278, 1711, 24, 52, "Input",ExpressionUUID->"2e6d5597-638c-4475-a7a1-dd658645c32c"],
Cell[CellGroupData[{
Cell[392168, 9306, 152, 3, 30, "Input",ExpressionUUID->"1590703b-5aab-4275-92ce-0a83c4d23f82"],
Cell[392323, 9311, 8566, 215, 97, "Output",ExpressionUUID->"5cf2f4ee-e262-4600-aae8-4fd9b7def9cc"]
}, Open  ]]
}
]
*)

